aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Northrend
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2018-04-01 13:52:36 +0200
committerTreeston <treeston.mmoc@gmail.com>2018-04-01 13:52:36 +0200
commit4692e10ca2ffed5ba2a0336e9c93962b0fad9eaa (patch)
treea5324da18c6bec3aab267006c6da615918329510 /src/server/scripts/Northrend
parentfb39980c52cdb28b9de43356ee37470c7fd6797c (diff)
Core/Position: Refactor GetAngle -> GetAbsoluteAngle because code clarity is good.
Diffstat (limited to 'src/server/scripts/Northrend')
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp2
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp2
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp4
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp2
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp6
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp4
-rw-r--r--src/server/scripts/Northrend/zone_icecrown.cpp2
10 files changed, 14 insertions, 14 deletions
diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
index 1d6eed64946..9451f123ee2 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
@@ -368,7 +368,7 @@ class npc_prince_taldaram_flame_sphere : public CreatureScript
if (!sphereTarget)
return;
- float angle = me->GetAngle(sphereTarget) + angleOffset;
+ float angle = me->GetAbsoluteAngle(sphereTarget) + angleOffset;
float x = me->GetPositionX() + distOffset * std::cos(angle);
float y = me->GetPositionY() + distOffset * std::sin(angle);
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
index 969ca6cd63f..4c902435ba8 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
@@ -1029,7 +1029,7 @@ class npc_meteor_strike_initial : public CreatureScript
Position const* ownerPos = halionAI->GetMeteorStrikePosition();
float randomAdjustment = frand(static_cast<float>(M_PI / 5.0f), static_cast<float>(M_PI / 2.0f));
float angle[4];
- angle[0] = me->GetAngle(ownerPos);
+ angle[0] = me->GetAbsoluteAngle(ownerPos);
angle[1] = angle[0] + randomAdjustment;
angle[2] = angle[0] + static_cast<float>(M_PI);
angle[3] = angle[2] + randomAdjustment;
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
index 1a78118b7c1..0f0047ef819 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
@@ -2790,7 +2790,7 @@ class spell_hor_evasion : public SpellScriptLoader
if (pos.IsInDist2d(&home, 15.0f))
return;
- float angle = pos.GetAngle(&home);
+ float angle = pos.GetAbsoluteAngle(&home);
float dist = GetSpellInfo()->Effects[EFFECT_0].CalcRadius(GetCaster());
target->MovePosition(pos, dist, angle);
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
index 9190216e2a5..b4017d47908 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
@@ -647,7 +647,7 @@ class boss_prince_keleseth_icc : public CreatureScript
summons.Summon(summon);
Position pos = me->GetPosition();
float maxRange = me->GetDistance2d(summon);
- float angle = me->GetAngle(summon);
+ float angle = me->GetAbsoluteAngle(summon);
me->MovePositionToFirstCollision(pos, maxRange, angle);
summon->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation());
summon->ToTempSummon()->SetTempSummonType(TEMPSUMMON_CORPSE_DESPAWN);
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
index e13d6fc5bd7..7830e96c29b 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
@@ -379,7 +379,7 @@ class npc_coldflame : public CreatureScript
if (owner->HasAura(SPELL_BONE_STORM))
{
- float ang = Position::NormalizeOrientation(pos.GetAngle(me));
+ float ang = pos.GetAbsoluteAngle(me);
me->SetOrientation(ang);
owner->GetNearPoint2D(pos.m_positionX, pos.m_positionY, 5.0f - owner->GetCombatReach(), ang);
}
@@ -392,7 +392,7 @@ class npc_coldflame : public CreatureScript
return;
}
- float ang = Position::NormalizeOrientation(pos.GetAngle(target));
+ float ang = pos.GetAbsoluteAngle(target);
me->SetOrientation(ang);
owner->GetNearPoint2D(pos.m_positionX, pos.m_positionY, 15.0f - owner->GetCombatReach(), ang);
}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
index 6352fb71b8d..7353486e186 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
@@ -1715,7 +1715,7 @@ class npc_strangulate_vehicle : public CreatureScript
{
if (me->GetExactDist(lichKing) > 10.0f)
{
- Position pos = lichKing->GetNearPosition(float(rand_norm()) * 5.0f + 7.5f, lichKing->GetAngle(me));
+ Position pos = lichKing->GetNearPosition(float(rand_norm()) * 5.0f + 7.5f, lichKing->GetAbsoluteAngle(me));
me->GetMotionMaster()->MovePoint(0, pos);
}
}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
index fa0015c02d2..d9c1c8e1128 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
@@ -1290,7 +1290,7 @@ struct npc_argent_captainAI : public ScriptedAI
if (Creature* crok = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_CROK_SCOURGEBANE)))
{
me->SetReactState(REACT_DEFENSIVE);
- FollowAngle = me->GetAngle(crok) + me->GetOrientation();
+ FollowAngle = me->GetAbsoluteAngle(crok) + me->GetOrientation();
FollowDist = me->GetDistance2d(crok);
me->GetMotionMaster()->MoveFollow(crok, FollowDist, FollowAngle, MOTION_SLOT_IDLE);
}
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
index 0d4dd46ed99..72acb22914a 100644
--- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
+++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
@@ -464,7 +464,7 @@ public:
{
Position pos;
pos.m_positionZ = alexstraszaBunny->GetPositionZ();
- alexstraszaBunny->GetNearPoint2D(pos.m_positionX, pos.m_positionY, 30.0f, alexstraszaBunny->GetAngle(me));
+ alexstraszaBunny->GetNearPoint2D(pos.m_positionX, pos.m_positionY, 30.0f, alexstraszaBunny->GetAbsoluteAngle(me));
me->GetMotionMaster()->MoveLand(POINT_LAND_P_ONE, pos);
me->SetImmuneToAll(false);
me->SetReactState(REACT_AGGRESSIVE);
@@ -847,7 +847,7 @@ public:
Position randomPosOnRadius;
// Hardcodded retail value, reason is Z getters can fail... (TO DO: Change to getter when height calculation works on 100%!)
randomPosOnRadius.m_positionZ = 283.0521f;
- alexstraszaBunny->GetNearPoint2D(randomPosOnRadius.m_positionX, randomPosOnRadius.m_positionY, 120.0f, alexstraszaBunny->GetAngle(me));
+ alexstraszaBunny->GetNearPoint2D(randomPosOnRadius.m_positionX, randomPosOnRadius.m_positionY, 120.0f, alexstraszaBunny->GetAbsoluteAngle(me));
me->GetMotionMaster()->MovePoint(POINT_FLY_OUT_OF_PLATFORM_P_TWO, randomPosOnRadius);
_flyingOutOfPlatform = true;
}
@@ -1673,7 +1673,7 @@ class spell_malygos_random_portal : public SpellScriptLoader
{
Position pos;
pos.m_positionZ = target->GetPositionZ();
- target->GetNearPoint2D(pos.m_positionX, pos.m_positionY, frand(29.1f, 30.0f), target->GetAngle(malygos));
+ target->GetNearPoint2D(pos.m_positionX, pos.m_positionY, frand(29.1f, 30.0f), target->GetAbsoluteAngle(malygos));
malygos->GetMotionMaster()->MovePoint(POINT_NEAR_RANDOM_PORTAL_P_NONE, pos);
}
}
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
index 4f72c6b80b6..f28253d6504 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
@@ -336,7 +336,7 @@ class spell_varos_energize_core_area_enemy : public SpellScriptLoader
for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end();)
{
- float angle = varos->GetAngle((*itr)->GetPositionX(), (*itr)->GetPositionY());
+ float angle = varos->GetAbsoluteAngle((*itr)->GetPositionX(), (*itr)->GetPositionY());
float diff = std::fabs(orientation - angle);
if (diff > 1.0f)
@@ -380,7 +380,7 @@ class spell_varos_energize_core_area_entry : public SpellScriptLoader
for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end();)
{
- float angle = varos->GetAngle((*itr)->GetPositionX(), (*itr)->GetPositionY());
+ float angle = varos->GetAbsoluteAngle((*itr)->GetPositionX(), (*itr)->GetPositionY());
float diff = std::fabs(orientation - angle);
if (diff > 1.0f)
diff --git a/src/server/scripts/Northrend/zone_icecrown.cpp b/src/server/scripts/Northrend/zone_icecrown.cpp
index 237e0ae6ef0..32ace5b6b0e 100644
--- a/src/server/scripts/Northrend/zone_icecrown.cpp
+++ b/src/server/scripts/Northrend/zone_icecrown.cpp
@@ -751,7 +751,7 @@ class npc_frostbrood_skytalon : public CreatureScript
{
Position randomPosOnRadius;
randomPosOnRadius.m_positionZ = (me->GetPositionZ() + 40.0f);
- me->GetNearPoint2D(randomPosOnRadius.m_positionX, randomPosOnRadius.m_positionY, 40.0f, me->GetAngle(me));
+ me->GetNearPoint2D(randomPosOnRadius.m_positionX, randomPosOnRadius.m_positionY, 40.0f, me->GetAbsoluteAngle(me));
me->GetMotionMaster()->MovePoint(POINT_FLY_AWAY, randomPosOnRadius);
}
}