--- src/game/SharedDefines.h 2009-05-17 14:30:52.000000000 +0400 +++ src/game/SharedDefines.h 2009-05-20 14:26:25.000000000 +0400 @@ -259,7 +259,7 @@ #define SPELL_ATTR_EX_UNK14 0x00004000 // 14 #define SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY 0x00008000 // 15 remove auras on immunity #define SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE 0x00010000 // 16 unaffected by school immunity -#define SPELL_ATTR_EX_UNK17 0x00020000 // 17 +#define SPELL_ATTR_EX_PET_NOT_AUTOCASTABLE 0x00020000 // 17 not autocastable by pets?? #define SPELL_ATTR_EX_UNK18 0x00040000 // 18 #define SPELL_ATTR_EX_UNK19 0x00080000 // 19 #define SPELL_ATTR_EX_REQ_COMBO_POINTS1 0x00100000 // 20 Req combo points on target --- src/game/SpellMgr.h 2009-05-17 14:30:52.000000000 +0400 +++ src/game/SpellMgr.h 2009-05-20 14:25:29.000000000 +0400 @@ -148,6 +148,7 @@ bool IsSingleFromSpellSpecificPerCaster(SpellSpecific spellSpec1,SpellSpecific spellSpec2); bool IsSingleFromSpellSpecificRanksPerTarget(SpellSpecific spellId_spec, SpellSpecific i_spellId_spec); bool IsPassiveSpell(uint32 spellId); +bool IsPetAutoCastableSpell(uint32 spellId); inline bool IsPassiveSpellStackableWithRanks(SpellEntry const* spellProto) { --- src/game/SpellMgr.cpp 2009-05-17 14:30:52.000000000 +0400 +++ src/game/SpellMgr.cpp 2009-05-20 14:27:39.000000000 +0400 @@ -98,6 +98,14 @@ return (spellInfo->Attributes & SPELL_ATTR_PASSIVE) != 0; } +bool IsPetAutoCastableSpell(uint32 spellId) +{ + SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId); + if (!spellInfo) + return false; + return (spellInfo->AttributesEx & SPELL_ATTR_EX_PET_NOT_AUTOCASTABLE) == 0; +} + bool IsNoStackAuraDueToAura(uint32 spellId_1, uint32 effIndex_1, uint32 spellId_2, uint32 effIndex_2) { SpellEntry const *spellInfo_1 = sSpellStore.LookupEntry(spellId_1); --- src/game/Pet.cpp 2009-05-20 14:31:11.000000000 +0400 +++ src/game/Pet.cpp 2009-05-20 14:30:13.000000000 +0400 @@ -1339,7 +1339,7 @@ if(IsPassiveSpell(spell_id)) newspell.active = ACT_PASSIVE; else - newspell.active = ACT_DISABLED; + newspell.active = IsPetAutoCastableSpell(spell_id) ? ACT_DISABLED : ACT_PASSIVE; } else newspell.active = active; @@ -1726,6 +1726,9 @@ if(IsPassiveSpell(spellid)) return; + if (!IsPetAutoCastableSpell(spellid)) + return; + PetSpellMap::iterator itr = m_spells.find(spellid); int i; --- src/game/Unit.cpp 2009-05-20 15:27:19.000000000 +0400 +++ src/game/Unit.cpp 2009-05-20 15:22:15.000000000 +0400 @@ -10405,7 +10405,7 @@ } if(onlyselfcast || !IsPositiveSpell(spellId)) //only self cast and spells versus enemies are autocastable - newstate = ACT_DISABLED; + newstate = IsPetAutoCastableSpell(spellId) ? ACT_DISABLED : ACT_PASSIVE; else newstate = ACT_PASSIVE; @@ -10433,7 +10433,7 @@ if (!oldid) { if (newstate == ACT_DECIDE) - PetActionBar[i].Type = ACT_DISABLED; + PetActionBar[i].Type = IsPetAutoCastableSpell(newid) ? ACT_DISABLED : ACT_PASSIVE; else PetActionBar[i].Type = newstate; } @@ -10450,6 +10450,9 @@ if(IsPassiveSpell(spellid)) return; + if (!IsPetAutoCastableSpell(spellid)) + return; + for(uint32 x = 0; x < CREATURE_MAX_SPELLS; ++x) { if(spellid == m_charmspells[x].spellId)