[7752] Correctly restore autocast state for spells at spell loading. Author: Az@zel

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-03 22:29:32 -05:00
parent bb37911480
commit 7181ec3b9a
+6
View File
@@ -1232,6 +1232,12 @@ bool Pet::addSpell(uint32 spell_id, uint16 active, PetSpellState state, PetSpell
{ {
// can be in case spell loading but learned at some previous spell loading // can be in case spell loading but learned at some previous spell loading
itr->second->state = PETSPELL_UNCHANGED; itr->second->state = PETSPELL_UNCHANGED;
if(active == ACT_ENABLED)
ToggleAutocast(spell_id, true);
else if(active == ACT_DISABLED)
ToggleAutocast(spell_id, false);
return false; return false;
} }
else else