From 53967893be1fc60fc277ea87980c47dd3910d2f9 Mon Sep 17 00:00:00 2001 From: "Az@zel" Date: Mon, 4 May 2009 05:41:14 +0400 Subject: [PATCH] [7752] Correctly restore autocast state for spells at spell loading. Signed-off-by: VladimirMangos --- src/game/Pet.cpp | 6 ++++++ src/shared/revision_nr.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index 1287d0051..07c4fb6dc 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -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 itr->second->state = PETSPELL_UNCHANGED; + + if(active == ACT_ENABLED) + ToggleAutocast(spell_id, true); + else if(active == ACT_DISABLED) + ToggleAutocast(spell_id, false); + return false; } else diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index f38b4b985..a0fcda953 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7751" + #define REVISION_NR "7752" #endif // __REVISION_NR_H__