diff --git a/src/game/Totem.cpp b/src/game/Totem.cpp index 0e874ca15..31226900d 100644 --- a/src/game/Totem.cpp +++ b/src/game/Totem.cpp @@ -159,3 +159,19 @@ void Totem::SetTypeBySummonSpell(SpellEntry const * spellProto) if(spellProto->SpellIconID==2056) m_type = TOTEM_STATUE; //Jewelery statue } + +bool Totem::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges) +{ + for (int i=0;i<3;i++) + { + switch(spellInfo->EffectApplyAuraName[i]) + { + case SPELL_AURA_PERIODIC_DAMAGE: + case SPELL_AURA_PERIODIC_LEECH: + return true; + default: + continue; + } + } + return Creature::IsImmunedToSpell(spellInfo, useCharges); +} diff --git a/src/game/Totem.h b/src/game/Totem.h index 1bfa7a027..33ace85c6 100644 --- a/src/game/Totem.h +++ b/src/game/Totem.h @@ -53,6 +53,8 @@ class Totem : public Creature void UpdateAttackPowerAndDamage(bool /*ranged*/ ) {} void UpdateDamagePhysical(WeaponAttackType /*attType*/) {} + bool IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges = false); + protected: TotemType m_type; uint32 m_duration; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 1621c93c2..339a59079 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -6430,21 +6430,21 @@ bool Unit::HandleOverrideClassScriptAuraProc(Unit *pVictim, int32 scriptId, uint { case 836: // Improved Blizzard (Rank 1) { - if( !procSpell || procSpell->SpellVisual!=9487 ) + if (!procSpell || procSpell->SpellVisual!=9487) return false; triggered_spell_id = 12484; break; } case 988: // Improved Blizzard (Rank 2) { - if( !procSpell || procSpell->SpellVisual!=9487 ) + if (!procSpell || procSpell->SpellVisual!=9487) return false; triggered_spell_id = 12485; break; } case 989: // Improved Blizzard (Rank 3) { - if( !procSpell || procSpell->SpellVisual!=9487 ) + if (!procSpell || procSpell->SpellVisual!=9487) return false; triggered_spell_id = 12486; break;