WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   GetSpellInfo with name issue (https://www.wowinterface.com/forums/showthread.php?t=48366)

Freebaser 10-16-13 02:36 PM

GetSpellInfo with name issue
 
Code:

print( (GetSpellInfo(116257) == "Invoker's Energy") )

-- true


print( GetSpellInfo("Invoker's Energy") )

-- nil

Seems to be an issue with apostrophes. Is there a work around for this?

Edit: searching with spellName is limited to your spellbook

humfras 10-16-13 02:49 PM

Keep in mind that
Quote:

Using spellId as the argument will always return the info. Using spellName or spellLink will only return the info if the spell is in your spellbook. Otherwise it will return nil.
http://wowpedia.org/API_GetSpellInfo

semlar 10-16-13 02:50 PM

As far as I know you can only use the spell name if it's in your spell book.

Multiple spells have the same name so it would be unreliable to look up information with it, not to mention issues with localization.

Freebaser 10-16-13 03:38 PM

Ah, wasn't aware of the spellbook limitation.


All times are GMT -6. The time now is 06:35 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI