is_spell_talented
The is_spell_talented
function checks if a specified spell is talented (i.e., if the player has selected the talent for that spell). This function is useful for determining whether a spell is available based on the player's talent configuration.
Parameters
spellID
(number): The ID of the spell to check.
Returns
is_talented
(boolean): Returnstrue
if the spell is talented, otherwise returnsfalse
.
Example Usage in Lua
Here is an example of how to use the is_spell_talented
function in Lua:
local api = ...
-- Function to check if a spell is talented and print the result
function CheckSpellTalented(spellID)
local is_talented = api.is_spell_talented(spellID)
if is_talented then
print("The spell with ID " .. spellID .. " is talented.")
else
print("The spell with ID " .. spellID .. " is not talented.")
end
end
-- Example usage: Check if the spell with ID 12345 is talented
CheckSpellTalented(12345)