Core/Movement: Fixed knockback visibility for other players (no more "teleport") and knockback strength from creature spells (this does not fix knocking creatures back)

This commit is contained in:
Shauren
2011-09-30 18:24:12 +02:00
parent 18aad847e1
commit da54fb92d5
4 changed files with 20 additions and 8 deletions

View File

@@ -6241,11 +6241,7 @@ void Spell::EffectKnockBack(SpellEffIndex effIndex)
if (unitTarget->IsNonMeleeSpellCasted(true))
unitTarget->InterruptNonMeleeSpells(true);
float ratio = m_caster->GetCombatReach() / std::max(unitTarget->GetCombatReach(), 1.0f);
if (ratio < 1.0f)
ratio = ratio * ratio * ratio * 0.1f; // volume = length^3
else
ratio = 0.1f; // dbc value ratio
float ratio = 0.1f;
float speedxy = float(m_spellInfo->Effects[effIndex].MiscValue) * ratio;
float speedz = float(damage) * ratio;
if (speedxy < 0.1f && speedz < 0.1f)