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:
1 parent
3f03415073
commit
0d46b893fc
23 files changed
+71
-75
No files matched your search
@@ -953,7 +953,7 @@ public:
|
||||
uint32 entry = (uint32)atoi(e);
|
||||
|
||||
float x, y, z, o = handler->GetSession()->GetPlayer()->GetOrientation();
|
||||
handler->GetSession()->GetPlayer()->GetClosePoint(x, y, z, handler->GetSession()->GetPlayer()->GetObjectSize());
|
||||
handler->GetSession()->GetPlayer()->GetClosePoint(x, y, z, handler->GetSession()->GetPlayer()->GetCombatReach());
|
||||
|
||||
if (!i)
|
||||
return handler->GetSession()->GetPlayer()->SummonCreature(entry, x, y, z, o) != nullptr;
|
||||
|
||||
@@ -154,7 +154,7 @@ public:
|
||||
|
||||
// before GM
|
||||
float x, y, z;
|
||||
gmPlayer->GetClosePoint(x, y, z, player->GetObjectSize());
|
||||
gmPlayer->GetClosePoint(x, y, z, player->GetCombatReach());
|
||||
player->TeleportTo(gmPlayer->GetMapId(), x, y, z, player->GetOrientation());
|
||||
}
|
||||
|
||||
|
||||
@@ -581,7 +581,7 @@ public:
|
||||
|
||||
// before GM
|
||||
float x, y, z;
|
||||
_player->GetClosePoint(x, y, z, target->GetObjectSize());
|
||||
_player->GetClosePoint(x, y, z, target->GetCombatReach());
|
||||
target->TeleportTo(_player->GetMapId(), x, y, z, target->GetOrientation());
|
||||
PhasingHandler::InheritPhaseShift(target, handler->GetSession()->GetPlayer());
|
||||
target->UpdateObjectVisibility();
|
||||
|
||||
@@ -1426,7 +1426,7 @@ public:
|
||||
|
||||
// place pet before player
|
||||
float x, y, z;
|
||||
player->GetClosePoint (x, y, z, creatureTarget->GetObjectSize(), CONTACT_DISTANCE);
|
||||
player->GetClosePoint (x, y, z, creatureTarget->GetCombatReach(), CONTACT_DISTANCE);
|
||||
pet->Relocate(x, y, z, float(M_PI) - player->GetOrientation());
|
||||
|
||||
// set pet to defensive mode by default (some classes can't control controlled pets in fact).
|
||||
|
||||
@@ -114,7 +114,7 @@ class boss_selin_fireheart : public CreatureScript
|
||||
CrystalGUID = crystal->GetGUID();
|
||||
|
||||
float x, y, z;
|
||||
crystal->GetClosePoint(x, y, z, me->GetObjectSize(), CONTACT_DISTANCE);
|
||||
crystal->GetClosePoint(x, y, z, me->GetCombatReach(), CONTACT_DISTANCE);
|
||||
|
||||
events.SetPhase(PHASE_DRAIN);
|
||||
me->SetWalk(false);
|
||||
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
FlyBackTimer = 500;
|
||||
break;
|
||||
case 1:
|
||||
player->GetClosePoint(x, y, z, me->GetObjectSize());
|
||||
player->GetClosePoint(x, y, z, me->GetCombatReach());
|
||||
z += 2.5f;
|
||||
x -= 2.0f;
|
||||
y -= 1.5f;
|
||||
|
||||
@@ -868,7 +868,7 @@ public:
|
||||
/// TODO: Remove this once we find a general rule for WorldObject::MovePosition (this spell shouldn't take the Z change into consideration)
|
||||
Unit* caster = GetCaster();
|
||||
float angle = float(rand_norm()) * static_cast<float>(2 * M_PI);
|
||||
uint32 dist = caster->GetObjectSize() + GetSpellInfo()->Effects[EFFECT_0].CalcRadius(caster) * (float)rand_norm();
|
||||
uint32 dist = caster->GetCombatReach() + GetSpellInfo()->Effects[EFFECT_0].CalcRadius(caster) * (float)rand_norm();
|
||||
|
||||
float x = caster->GetPositionX() + dist * std::cos(angle);
|
||||
float y = caster->GetPositionY() + dist * std::sin(angle);
|
||||
|
||||
@@ -145,7 +145,7 @@ class boss_king_dred : public CreatureScript
|
||||
DoCastVictim(SPELL_RAPTOR_CALL);
|
||||
|
||||
float x, y, z;
|
||||
me->GetClosePoint(x, y, z, me->GetObjectSize() / 3, 10.0f);
|
||||
me->GetClosePoint(x, y, z, me->GetCombatReach() / 3, 10.0f);
|
||||
me->SummonCreature(RAND(NPC_DRAKKARI_GUTRIPPER, NPC_DRAKKARI_SCYTHECLAW), x, y, z, 0, TEMPSUMMON_DEAD_DESPAWN, 1000);
|
||||
events.ScheduleEvent(EVENT_RAPTOR_CALL, urand(20000, 25000));
|
||||
break;
|
||||
|
||||
@@ -131,7 +131,7 @@ class boss_bronjahm : public CreatureScript
|
||||
{
|
||||
summons.Summon(summon);
|
||||
summon->SetReactState(REACT_PASSIVE);
|
||||
summon->GetMotionMaster()->MoveFollow(me, me->GetObjectSize(), 0.0f);
|
||||
summon->GetMotionMaster()->MoveFollow(me, me->GetCombatReach(), 0.0f);
|
||||
summon->CastSpell(summon, SPELL_PURPLE_BANISH_VISUAL, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -807,7 +807,7 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_DEATHBRINGER_SAURFANG)))
|
||||
{
|
||||
float x, y, z;
|
||||
deathbringer->GetClosePoint(x, y, z, deathbringer->GetObjectSize());
|
||||
deathbringer->GetClosePoint(x, y, z, deathbringer->GetCombatReach());
|
||||
me->SetWalk(true);
|
||||
me->GetMotionMaster()->MovePoint(POINT_CORPSE, x, y, z);
|
||||
}
|
||||
|
||||
@@ -381,7 +381,7 @@ class npc_coldflame : public CreatureScript
|
||||
{
|
||||
float ang = Position::NormalizeOrientation(pos.GetAngle(me));
|
||||
me->SetOrientation(ang);
|
||||
owner->GetNearPoint2D(pos.m_positionX, pos.m_positionY, 5.0f - owner->GetObjectSize(), ang);
|
||||
owner->GetNearPoint2D(pos.m_positionX, pos.m_positionY, 5.0f - owner->GetCombatReach(), ang);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -394,7 +394,7 @@ class npc_coldflame : public CreatureScript
|
||||
|
||||
float ang = Position::NormalizeOrientation(pos.GetAngle(target));
|
||||
me->SetOrientation(ang);
|
||||
owner->GetNearPoint2D(pos.m_positionX, pos.m_positionY, 15.0f - owner->GetObjectSize(), ang);
|
||||
owner->GetNearPoint2D(pos.m_positionX, pos.m_positionY, 15.0f - owner->GetCombatReach(), ang);
|
||||
}
|
||||
|
||||
me->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
||||
@@ -512,7 +512,7 @@ class spell_marrowgar_coldflame : public SpellScriptLoader
|
||||
{
|
||||
targets.clear();
|
||||
// select any unit but not the tank (by owners threatlist)
|
||||
Unit* target = GetCaster()->GetAI()->SelectTarget(SELECT_TARGET_RANDOM, 1, -GetCaster()->GetObjectSize(), true, -SPELL_IMPALED);
|
||||
Unit* target = GetCaster()->GetAI()->SelectTarget(SELECT_TARGET_RANDOM, 1, -GetCaster()->GetCombatReach(), true, -SPELL_IMPALED);
|
||||
if (!target)
|
||||
target = GetCaster()->GetAI()->SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true); // or the tank if its solo
|
||||
if (!target)
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
float x, y, z;
|
||||
me->GetClosePoint(x, y, z, me->GetObjectSize() / 3, 0.1f);
|
||||
me->GetClosePoint(x, y, z, me->GetCombatReach() / 3, 0.1f);
|
||||
|
||||
if (Creature* summon = me->SummonCreature(NPC_RAGECLAW, x, y, z, 0, TEMPSUMMON_DEAD_DESPAWN, 1000))
|
||||
{
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
void Reset() override
|
||||
{
|
||||
float x, y, z;
|
||||
me->GetClosePoint(x, y, z, me->GetObjectSize() / 3, 25.0f);
|
||||
me->GetClosePoint(x, y, z, me->GetCombatReach() / 3, 25.0f);
|
||||
me->GetMotionMaster()->MovePoint(0, x, y, z);
|
||||
}
|
||||
|
||||
|
||||
@@ -525,7 +525,7 @@ public:
|
||||
|
||||
Tapped = true;
|
||||
float x, y, z;
|
||||
caster->GetClosePoint(x, y, z, me->GetObjectSize());
|
||||
caster->GetClosePoint(x, y, z, me->GetCombatReach());
|
||||
|
||||
me->SetWalk(false);
|
||||
me->GetMotionMaster()->MovePoint(1, x, y, z);
|
||||
|
||||
@@ -475,7 +475,7 @@ class go_shrine_of_the_birds : public GameObjectScript
|
||||
uint32 BirdEntry = 0;
|
||||
|
||||
float fX, fY, fZ;
|
||||
me->GetClosePoint(fX, fY, fZ, me->GetObjectSize(), INTERACTION_DISTANCE);
|
||||
me->GetClosePoint(fX, fY, fZ, me->GetCombatReach(), INTERACTION_DISTANCE);
|
||||
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
|
||||
@@ -244,7 +244,7 @@ public:
|
||||
return true;
|
||||
|
||||
float x, y, z;
|
||||
go->GetClosePoint(x, y, z, go->GetObjectSize() / 3, 7.0f);
|
||||
go->GetClosePoint(x, y, z, go->GetCombatReach() / 3, 7.0f);
|
||||
go->SummonGameObject(GO_HIGH_QUALITY_FUR, *go, QuaternionData(), 1);
|
||||
if (TempSummon* summon = player->SummonCreature(NPC_NESINGWARY_TRAPPER, x, y, z, go->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 1000))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user