diff options
author | Kudlaty <none@none> | 2009-10-31 01:50:52 +0100 |
---|---|---|
committer | Kudlaty <none@none> | 2009-10-31 01:50:52 +0100 |
commit | 98d53f6a9d32462283cac9e43d31f8a0c132c53b (patch) | |
tree | 46e938328f91125b38dcbf6b49a553c18f93e35e /src/game/Unit.cpp | |
parent | a5937d9d13f5071c1b54dc1c3fa9530a2494e778 (diff) |
Fix Feeding Frenzy, Cobra Reflexes, Cornered. Now they are active only when victim hp is below certain percentage. Patch by thenecromancer, updated by krz
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 12 |
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 |