Core/Spells: fix wrong distance calculations in AoE spells [Needs testing] (#16290)
Core/Spells: Fix wrong distance calculations in AoE spells. Pull request #16290 by chaodhib. God bless, finally. (cherry picked from commit a1f2f30c145f6ad9c4baeffeff32618e71ff537c)
This commit is contained in:
1 parent
4ad1d377fe
commit
17c4d8f6d9
11 files changed
+123
-46
No files matched your search
@@ -2940,7 +2940,7 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex)
|
||||
destTarget->GetPosition(x, y, z, o);
|
||||
else
|
||||
{
|
||||
m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE);
|
||||
m_caster->GetClosePoint(x, y, z, DEFAULT_PLAYER_BOUNDING_RADIUS);
|
||||
o = target->GetOrientation();
|
||||
}
|
||||
|
||||
@@ -3999,7 +3999,7 @@ void Spell::EffectSummonObject(SpellEffIndex effIndex)
|
||||
// Summon in random point all other units if location present
|
||||
else
|
||||
{
|
||||
m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE);
|
||||
m_caster->GetClosePoint(x, y, z, DEFAULT_PLAYER_BOUNDING_RADIUS);
|
||||
o = m_caster->GetOrientation();
|
||||
}
|
||||
|
||||
@@ -4780,7 +4780,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
else if (m_spellInfo->Effects[effIndex].HasRadius() && m_spellInfo->Speed == 0)
|
||||
{
|
||||
float dis = m_spellInfo->Effects[effIndex].CalcRadius(m_originalCaster);
|
||||
m_caster->GetClosePoint(fx, fy, fz, DEFAULT_WORLD_OBJECT_SIZE, dis);
|
||||
m_caster->GetClosePoint(fx, fy, fz, DEFAULT_PLAYER_BOUNDING_RADIUS, dis);
|
||||
fo = m_caster->GetOrientation();
|
||||
}
|
||||
else
|
||||
@@ -4790,7 +4790,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
float max_dis = m_spellInfo->GetMaxRange(true);
|
||||
float dis = (float)rand_norm() * (max_dis - min_dis) + min_dis;
|
||||
|
||||
m_caster->GetClosePoint(fx, fy, fz, DEFAULT_WORLD_OBJECT_SIZE, dis);
|
||||
m_caster->GetClosePoint(fx, fy, fz, DEFAULT_PLAYER_BOUNDING_RADIUS, dis);
|
||||
fo = m_caster->GetOrientation();
|
||||
}
|
||||
|
||||
@@ -5580,7 +5580,7 @@ void Spell::EffectSummonPersonalGameObject(SpellEffIndex effIndex)
|
||||
destTarget->GetPosition(x, y, z, o);
|
||||
else
|
||||
{
|
||||
m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE);
|
||||
m_caster->GetClosePoint(x, y, z, DEFAULT_PLAYER_BOUNDING_RADIUS);
|
||||
o = m_caster->GetOrientation();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user