aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 1bf919b133f..e63a0c5cf6d 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -8446,6 +8446,18 @@ void Unit::ModifyAuraState(AuraState flag, bool apply)
CastSpell(this, itr->first, true, NULL);
}
}
+ else if (((Creature*)this)->isPet())
+ {
+ Pet *pet = ((Pet*)this);
+ for (PetSpellMap::const_iterator itr = pet->m_spells.begin(); itr != pet->m_spells.end(); ++itr)
+ {
+ if(itr->second.state == PLAYERSPELL_REMOVED) continue;
+ SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
+ if (!spellInfo || !IsPassiveSpell(itr->first)) continue;
+ if (spellInfo->CasterAuraState == flag)
+ CastSpell(this, itr->first, true, NULL);
+ }
+ }
}
}
else