Skip to content

Commit

Permalink
[WOWMadboxPC/Mechanic]Fix Jump Speed Calculation.
Browse files Browse the repository at this point in the history
This fixes Death Grip , Feral Charge - Cat and similar spells.
[Mechanic] Improved Jump speed calculation
thanks <PrinceCreed>
  • Loading branch information
Retriman committed Jan 26, 2011
1 parent 007716b commit 2e3cb6e
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/server/game/Spells/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1908,13 +1908,16 @@ void Spell::EffectJumpDest(SpellEffIndex effIndex)

void Spell::CalculateJumpSpeeds(uint8 i, float dist, float & speedXY, float & speedZ)
{
if (m_spellInfo->EffectMiscValue[i])
speedZ = float(m_spellInfo->EffectMiscValue[i])/10;
else if (m_spellInfo->EffectMiscValueB[i])
speedZ = float(m_spellInfo->EffectMiscValueB[i])/10;
else
speedZ = 10.0f;
speedXY = dist * 10.0f / speedZ;
if (m_spellInfo->EffectMiscValue[i] && m_spellInfo->EffectMiscValueB[i])
{
speedZ = float(m_spellInfo->EffectMiscValueB[i]) / 10;
speedXY = dist * float(m_spellInfo->EffectMiscValue[i]) / speedZ;
}
else
{
speedZ = 15.0f;
speedXY = dist * 10.0f / speedZ;
}
}

void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/)
Expand Down

0 comments on commit 2e3cb6e

Please sign in to comment.