View Single Post
08-13-08, 07:20 PM   #1
kerrang
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2006
Posts: 109
GetSpellInfo() has me tearing my hair out

I have a button on my Druid's actionbar which returns a spellid of '84'

GetSpellName(84,BOOKTYPE_SPELL) returns "Mangle (Cat)"

So far so good - or so you'd think...

GetSpellInfo("Mangle (Cat)") returns nil however
GetSpellInfo("Feline Grace") works - as does almost every other spell.

Here's the clincher tho

sn=GetSpellName(84,BOOKTYPE_SPELL)
name=GetSpellInfo(sn)
This results in name=nil

name=GetSpellInfo(GetSpellName(84,BOOKTYPE_SPELL))
This results in name="Mangle (Cat)"

WTF is going on here???

I'm assuming some asshat-stupidity related to the ()s!?

I've wasted probably 3 hours of my life chasing this around - and ended up with some horrible horrible code just to work around it.

Anyone got ANY idea what's going on because I'd like a heads-up before I walk into another 'illogical beartrap' like this!
  Reply With Quote