I have been using the CleanCore CastSpell (Labeled CastSpell2 in TomRuss IDA database) method for a while.
I get my spell Ids from the ActionBar data so it already has the SpellOveride Id applied, as oppose to getting them from the Spellbook data which I read does not have the override Ids applied.
With the latest patch I noticed a problem, namely when in Druid Guardian Spec Thrash did not cast correctly. I get a red message saying that I have not Learned that Spell.
If i click the action button, it works fine.
If I call it via the Lua Routine CastSpellByName and it works fine.
I traced CastSpellByName to it's call of CastSpell2 and compared the stack to the stack calling via the CleanCore Method and noticed that the 9th parameter was not zero.
For Thrash it was 0x1a150 which equals 106832 and is the "specialization" spell Id according to wowhead.
When I dump the spell overrides I see that Thrash is one of the spells that is over-ridden. Basically spell 106832 is over ridden by 77758.
I was calling with 77758.
I also tried calling with 106832 and that did not work either.
If i replace the CleanCore call with the ninth parameter being 0x1a150 the cast works correctly.
I have not figured out why Swipe which is also Overridden works with the ninth parameter being zero but Thrash does not.
I am going to do some testing and see if always putting the original spellbook ID in the ninth parameter and the override spell id in the second parameter will work all the time.
I will post my results later in this thread.
-counted
If this was helpful try the +rep button