[10112] Rename GetObjectSize function to GetObjectBoundingRadius

To reflect better what the function should actually return and also to clarify when used in misc calculations.

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-06-27 14:13:55 +02:00
parent 0757b43929
commit 3eb2d2910e
11 changed files with 46 additions and 46 deletions

View file

@ -3958,7 +3958,7 @@ void Spell::DoSummon(SpellEffectIndex eff_idx)
z = m_targets.m_destZ;
}
else
m_caster->GetClosePoint(x, y, z, spawnCreature->GetObjectSize());
m_caster->GetClosePoint(x, y, z, spawnCreature->GetObjectBoundingRadius());
spawnCreature->Relocate(x, y, z, -m_caster->GetOrientation());
spawnCreature->SetSummonPoint(x, y, z, -m_caster->GetOrientation());
@ -4377,7 +4377,7 @@ void Spell::DoSummonGuardian(SpellEffectIndex eff_idx, uint32 forceFaction)
}
// Summon if dest location not present near caster
else
m_caster->GetClosePoint(px, py, pz,spawnCreature->GetObjectSize());
m_caster->GetClosePoint(px, py, pz,spawnCreature->GetObjectBoundingRadius());
spawnCreature->Relocate(px, py, pz, m_caster->GetOrientation());
spawnCreature->SetSummonPoint(px, py, pz, m_caster->GetOrientation());
@ -4425,7 +4425,7 @@ void Spell::EffectTeleUnitsFaceCaster(SpellEffectIndex eff_idx)
float dis = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[eff_idx]));
float fx, fy, fz;
m_caster->GetClosePoint(fx, fy, fz, unitTarget->GetObjectSize(), dis);
m_caster->GetClosePoint(fx, fy, fz, unitTarget->GetObjectBoundingRadius(), dis);
unitTarget->NearTeleportTo(fx, fy, fz, -m_caster->GetOrientation(), unitTarget==m_caster);
}
@ -4762,7 +4762,7 @@ void Spell::EffectSummonPet(SpellEffectIndex eff_idx)
OldSummon->GetMap()->Remove((Creature*)OldSummon,false);
float px, py, pz;
m_caster->GetClosePoint(px, py, pz, OldSummon->GetObjectSize());
m_caster->GetClosePoint(px, py, pz, OldSummon->GetObjectBoundingRadius());
OldSummon->Relocate(px, py, pz, OldSummon->GetOrientation());
m_caster->GetMap()->Add((Creature*)OldSummon);
@ -4812,7 +4812,7 @@ void Spell::EffectSummonPet(SpellEffectIndex eff_idx)
}
float px, py, pz;
m_caster->GetClosePoint(px, py, pz, NewSummon->GetObjectSize());
m_caster->GetClosePoint(px, py, pz, NewSummon->GetObjectBoundingRadius());
NewSummon->Relocate(px, py, pz, m_caster->GetOrientation());
@ -6639,7 +6639,7 @@ void Spell::EffectSummonPlayer(SpellEffectIndex /*eff_idx*/)
return;
float x, y, z;
m_caster->GetClosePoint(x, y, z, unitTarget->GetObjectSize());
m_caster->GetClosePoint(x, y, z, unitTarget->GetObjectBoundingRadius());
((Player*)unitTarget)->SetSummonPoint(m_caster->GetMapId(),x,y,z);
@ -6725,7 +6725,7 @@ void Spell::DoSummonTotem(SpellEffectIndex eff_idx, uint8 slot_dbc)
float angle = slot < MAX_TOTEM_SLOT ? M_PI_F/MAX_TOTEM_SLOT - (slot*2*M_PI_F/MAX_TOTEM_SLOT) : 0;
float x, y, z;
m_caster->GetClosePoint(x, y, z, pTotem->GetObjectSize(), 2.0f, angle);
m_caster->GetClosePoint(x, y, z, pTotem->GetObjectBoundingRadius(), 2.0f, angle);
// totem must be at same Z in case swimming caster and etc.
if( fabs( z - m_caster->GetPositionZ() ) > 5 )
@ -7027,7 +7027,7 @@ void Spell::EffectLeapForward(SpellEffectIndex eff_idx)
// before caster
float fx, fy, fz;
unitTarget->GetClosePoint(fx, fy, fz, unitTarget->GetObjectSize(), dis);
unitTarget->GetClosePoint(fx, fy, fz, unitTarget->GetObjectBoundingRadius(), dis);
float ox, oy, oz;
unitTarget->GetPosition(ox, oy, oz);
@ -7234,7 +7234,7 @@ void Spell::DoSummonCritter(SpellEffectIndex eff_idx, uint32 forceFaction)
}
// Summon if dest location not present near caster
else
m_caster->GetClosePoint(x, y, z, critter->GetObjectSize());
m_caster->GetClosePoint(x, y, z, critter->GetObjectBoundingRadius());
critter->Relocate(x, y, z, m_caster->GetOrientation());
critter->SetSummonPoint(x, y, z, m_caster->GetOrientation());