* Implement immunity totems from periodic damage spell effects. Patch provided `win & DiSlord.

This commit is contained in:
VladimirMangos 2008-10-18 13:00:01 +04:00
parent 774e004954
commit ae01d16a73
3 changed files with 21 additions and 3 deletions

View file

@ -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);
}

View file

@ -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;

View file

@ -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;