From bc89e1cdb0da10e53cc9fa4a97565c05bb4c052e Mon Sep 17 00:00:00 2001 From: Treeston Date: Sun, 1 Apr 2018 13:52:36 +0200 Subject: Core/Position: Refactor GetAngle -> GetAbsoluteAngle because code clarity is good. (cherry picked from commit 4692e10ca2ffed5ba2a0336e9c93962b0fad9eaa) --- .../scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp | 2 +- src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp | 2 +- src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/server/scripts/Kalimdor') diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp index c25680ccb58..195ef3aacef 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp @@ -971,7 +971,7 @@ void hyjalAI::WaypointReached(uint32 waypointId, uint32 /*pathId*/) (*itr)->GetMotionMaster()->Initialize(); float range = 10; if (me->GetEntry() == THRALL)range = 20; - me->GetNearPoint(me, x, y, z, range, 0, me->GetAngle((*itr))); + me->GetNearPoint(me, x, y, z, range, 0, me->GetAbsoluteAngle((*itr))); (*itr)->GetMotionMaster()->MovePoint(0, x+irand(-5, 5), y+irand(-5, 5), me->GetPositionZ()); } } diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp index afbb89c17a9..4c796ca7fa4 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp @@ -316,7 +316,7 @@ public: if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) { //Face our target - DarkGlareAngle = me->GetAngle(target); + DarkGlareAngle = me->GetAbsoluteAngle(target); DarkGlareTickTimer = 1000; DarkGlareTick = 0; ClockWise = RAND(true, false); diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp index 019a183f31c..b438eb8f687 100644 --- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp @@ -153,7 +153,7 @@ public: break; case EVENT_RUN_AWAY: me->GetMotionMaster()->Clear(); - me->GetMotionMaster()->MovePoint(0, me->GetPositionX() + (std::cos(me->GetAngle(CrashSite)) * 28.0f), me->GetPositionY() + (std::sin(me->GetAngle(CrashSite)) * 28.0f), me->GetPositionZ() + 1.0f); + me->GetMotionMaster()->MovePoint(0, me->GetPositionX() + (std::cos(me->GetAbsoluteAngle(CrashSite)) * 28.0f), me->GetPositionY() + (std::sin(me->GetAbsoluteAngle(CrashSite)) * 28.0f), me->GetPositionZ() + 1.0f); me->DespawnOrUnsummon(Seconds(4)); break; default: -- cgit v1.2.3