Core/Objects:

*merged 3.3.5 renaming of GetObjectSize() to GetCombatReach()
*made GetBoundaryRadius virtual and use it to determine the actual spell radius distance with it instead of using CombatReach
This commit is contained in:
Ovahlord committed 2018-07-13 14:50:10 +02:00
1 parent 3f03415073
commit 0d46b893fc
23 files changed
+71 -75

No files matched your search

+6 -6
View File
@@ -2400,7 +2400,7 @@ void Spell::EffectTeleUnitsFaceCaster(SpellEffIndex effIndex)
float dis = m_spellInfo->Effects[effIndex].CalcRadius(m_caster);
float fx, fy, fz;
m_caster->GetClosePoint(fx, fy, fz, unitTarget->GetObjectSize(), dis);
m_caster->GetClosePoint(fx, fy, fz, unitTarget->GetCombatReach(), dis);
unitTarget->NearTeleportTo(fx, fy, fz, -m_caster->GetOrientation(), unitTarget == m_caster);
}
@@ -2768,7 +2768,7 @@ void Spell::EffectSummonPet(SpellEffIndex effIndex)
//OldSummon->GetMap()->Remove(OldSummon->ToCreature(), false);
float px, py, pz;
owner->GetClosePoint(px, py, pz, OldSummon->GetObjectSize());
owner->GetClosePoint(px, py, pz, OldSummon->GetCombatReach());
OldSummon->NearTeleportTo(px, py, pz, OldSummon->GetOrientation());
//OldSummon->Relocate(px, py, pz, OldSummon->GetOrientation());
@@ -2794,7 +2794,7 @@ void Spell::EffectSummonPet(SpellEffIndex effIndex)
}
float x, y, z;
owner->GetClosePoint(x, y, z, owner->GetObjectSize());
owner->GetClosePoint(x, y, z, owner->GetCombatReach());
Pet* pet = owner->SummonPet(petentry, x, y, z, owner->GetOrientation(), petType, 0);
if (!pet)
return;
@@ -4455,7 +4455,7 @@ void Spell::EffectCharge(SpellEffIndex /*effIndex*/)
if (!m_preGeneratedPath)
{
//unitTarget->GetContactPoint(m_caster, pos.m_positionX, pos.m_positionY, pos.m_positionZ);
Position pos = unitTarget->GetFirstCollisionPosition(unitTarget->GetObjectSize(), unitTarget->GetRelativeAngle(m_caster));
Position pos = unitTarget->GetFirstCollisionPosition(unitTarget->GetCombatReach(), unitTarget->GetRelativeAngle(m_caster));
m_caster->GetMotionMaster()->MoveCharge(pos.m_positionX, pos.m_positionY, pos.m_positionZ, speed);
}
else
@@ -4694,7 +4694,7 @@ void Spell::EffectResurrectPet(SpellEffIndex /*effIndex*/)
// Reposition the pet's corpse before reviving so as not to grab aggro
// We can use a different, more accurate version of GetClosePoint() since we have a pet
float x, y, z; // Will be used later to reposition the pet if we have one
player->GetClosePoint(x, y, z, pet->GetObjectSize(), PET_FOLLOW_DIST, pet->GetFollowAngle());
player->GetClosePoint(x, y, z, pet->GetCombatReach(), PET_FOLLOW_DIST, pet->GetFollowAngle());
pet->NearTeleportTo(x, y, z, player->GetOrientation());
pet->Relocate(x, y, z, player->GetOrientation()); // This is needed so SaveStayPosition() will get the proper coords.
}
@@ -5291,7 +5291,7 @@ void Spell::EffectCreateTamedPet(SpellEffIndex effIndex)
// relocate
float px, py, pz;
unitTarget->GetClosePoint(px, py, pz, pet->GetObjectSize(), PET_FOLLOW_DIST, pet->GetFollowAngle());
unitTarget->GetClosePoint(px, py, pz, pet->GetCombatReach(), PET_FOLLOW_DIST, pet->GetFollowAngle());
pet->Relocate(px, py, pz, unitTarget->GetOrientation());
// add to world