[9076] Another SPELL_EFFECT_PLAYER_PULL problem fix.

If base points porvided then this is _max_ pull distance, not direct distance.
This commit is contained in:
VladimirMangos 2009-12-27 23:44:25 +03:00
parent 41df9cd9ab
commit 7d0a830bd4
2 changed files with 6 additions and 2 deletions

View file

@ -6439,7 +6439,11 @@ void Spell::EffectPlayerPull(uint32 i)
if(!unitTarget)
return;
unitTarget->KnockBackFrom(m_caster, -float(damage ? damage : unitTarget->GetDistance2d(m_caster)),float(m_spellInfo->EffectMiscValue[i])/10);
float dist = unitTarget->GetDistance2d(m_caster);
if (damage && dist > damage)
dist = damage;
unitTarget->KnockBackFrom(m_caster,-dist,float(m_spellInfo->EffectMiscValue[i])/10);
}
void Spell::EffectDispelMechanic(uint32 i)