mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
* Implement immunity totems from periodic damage spell effects. Patch provided `win & DiSlord.
This commit is contained in:
parent
774e004954
commit
ae01d16a73
3 changed files with 21 additions and 3 deletions
|
|
@ -159,3 +159,19 @@ void Totem::SetTypeBySummonSpell(SpellEntry const * spellProto)
|
||||||
if(spellProto->SpellIconID==2056)
|
if(spellProto->SpellIconID==2056)
|
||||||
m_type = TOTEM_STATUE; //Jewelery statue
|
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);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,8 @@ class Totem : public Creature
|
||||||
void UpdateAttackPowerAndDamage(bool /*ranged*/ ) {}
|
void UpdateAttackPowerAndDamage(bool /*ranged*/ ) {}
|
||||||
void UpdateDamagePhysical(WeaponAttackType /*attType*/) {}
|
void UpdateDamagePhysical(WeaponAttackType /*attType*/) {}
|
||||||
|
|
||||||
|
bool IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges = false);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
TotemType m_type;
|
TotemType m_type;
|
||||||
uint32 m_duration;
|
uint32 m_duration;
|
||||||
|
|
|
||||||
|
|
@ -6430,21 +6430,21 @@ bool Unit::HandleOverrideClassScriptAuraProc(Unit *pVictim, int32 scriptId, uint
|
||||||
{
|
{
|
||||||
case 836: // Improved Blizzard (Rank 1)
|
case 836: // Improved Blizzard (Rank 1)
|
||||||
{
|
{
|
||||||
if( !procSpell || procSpell->SpellVisual!=9487 )
|
if (!procSpell || procSpell->SpellVisual!=9487)
|
||||||
return false;
|
return false;
|
||||||
triggered_spell_id = 12484;
|
triggered_spell_id = 12484;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 988: // Improved Blizzard (Rank 2)
|
case 988: // Improved Blizzard (Rank 2)
|
||||||
{
|
{
|
||||||
if( !procSpell || procSpell->SpellVisual!=9487 )
|
if (!procSpell || procSpell->SpellVisual!=9487)
|
||||||
return false;
|
return false;
|
||||||
triggered_spell_id = 12485;
|
triggered_spell_id = 12485;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 989: // Improved Blizzard (Rank 3)
|
case 989: // Improved Blizzard (Rank 3)
|
||||||
{
|
{
|
||||||
if( !procSpell || procSpell->SpellVisual!=9487 )
|
if (!procSpell || procSpell->SpellVisual!=9487)
|
||||||
return false;
|
return false;
|
||||||
triggered_spell_id = 12486;
|
triggered_spell_id = 12486;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue