Fix spells 52942 & 58837 (Loken Pulsing Shockwave: dinstance depending damage, by Josh
--HG-- branch : trunk
This commit is contained in:
@@ -431,6 +431,22 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
|
||||
damage = (m_caster->getLevel() - 60) * 4 + 60;
|
||||
break;
|
||||
}
|
||||
|
||||
// Loken Pulsing Shockwave
|
||||
case 59837:
|
||||
case 52942:
|
||||
{
|
||||
// don't damage self and only players
|
||||
if(unitTarget->GetGUID() == m_caster->GetGUID() || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
float radius = GetSpellRadiusForHostile(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[0]));
|
||||
if (!radius)
|
||||
return;
|
||||
float distance = m_caster->GetDistance2d(unitTarget);
|
||||
damage = (distance > radius) ? 0 : int32(m_spellInfo->EffectBasePoints[0]*distance);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user