[7752] Correctly restore autocast state for spells at spell loading.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Az@zel 2009-05-04 05:41:14 +04:00 committed by VladimirMangos
parent 4561dec27e
commit 53967893be
2 changed files with 7 additions and 1 deletions

View file

@ -1278,6 +1278,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

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "7751" #define REVISION_NR "7752"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__