From c8c042d326fca94dda656a8ff8910e15c6117800 Mon Sep 17 00:00:00 2001 From: qwe900 Date: Thu, 30 Mar 2023 00:54:46 +0200 Subject: [PATCH] fix(Scripts/IcecrownCitadel): Fixing last issue on Nerubs in ICC (#15651) now they fight after landing --- .../IcecrownCitadel/icecrown_citadel.cpp | 21 ++++--------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp index 0029019b2..01f4611c4 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp @@ -3372,7 +3372,7 @@ public: float nz = me->GetFloorZ(); DoCastSelf(SPELL_WEB_BEAM); me->SetHomePosition(nx, ny, nz, me->GetOrientation()); - me->GetMotionMaster()->MoveLand(1, nx, ny, nz, false); + me->GetMotionMaster()->MoveLand(POINT_LAND, nx, ny, nz, false); me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); return; } @@ -3388,25 +3388,12 @@ public: me->CallForHelp(15.0f); } - void JustReachedHome() override + void MovementInform(uint32 type, uint32 id) override { - if (me->IsLevitating()) + if (type == EFFECT_MOTION_TYPE && id == POINT_LAND) { - me->SetDisableGravity(false); me->SetImmuneToAll(false); - me->NearTeleportTo(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation()); - } - } - - void MovementInform(uint32 /*type*/, uint32 id) override - { - if (id == 1) - { - if (me->IsLevitating()) - { - me->SetDisableGravity(false); - me->SetOrientation(0.0f); - } + me->SetDisableGravity(false); } }