Hi all!
I'm not sure if anybody has already mentioned this bug, but there is a very annoying problem with pet's autocast spells. When pet has one or more spells set to autocast their state is not restored after pet creation (on login, after dismount, etc). And every time pet is recreated you should open spellbook and toggle autocast.
Probably there is already a fix for this problem, but latest Mangos version [7743] still has it.
The fix is really simple. Here is the patch:
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
index b8ea654..a99db44 100644
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
@@ -1278,6 +1278,10 @@ 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;
+ // restore previous autocast state
+ // (applicable only for ActiveStates with castable (0x8000) bit)
+ if (active & 0x8000)
+ ToggleAutocast(spell_id, active & 0x4000); // true if auto cast flag (0x4000) is set
return false;
}
else
I tested it on hunter's pet and it works.
If you have the same problem with autocast, please, test it. If other pets have this bug they should be tested as well...
I hope I helped someone.
Sincerely,
Az@zel