From 606c5dc7a8e22ac893a5fe81e82603e22d419b16 Mon Sep 17 00:00:00 2001 From: acidmanifesto Date: Fri, 25 Mar 2022 10:13:03 -0400 Subject: [PATCH] Fix (core) Death Comes from high Client Crash Fix (#11136) This fixes the client side crash while flying as the EYE OF ACHERUS, apparrently if the player lacks the visual spell on his character the client would crash. This is something I just want NOT ABLE to identify in debugger, however, true story also by the way, @TheDdraig made a suggestion while being both stone and highly intoxicate that he came up with the insane nonsensible approach that actually solved the issue 100%. Co-Authored-By: TheDdraig <62179779+TheDdraig@users.noreply.github.com> Co-authored-by: TheDdraig <62179779+TheDdraig@users.noreply.github.com> --- .../scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index ccd1a49a7..965c537c2 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -111,6 +111,10 @@ public: break; case EVENT_LAUNCH: { + if (Player* player = me->GetCharmerOrOwnerPlayerOrPlayerItself()) + { + player->AddAura(SPELL_EYE_OF_ACHERUS_VISUAL, player); + } me->SetSpeed(MOVE_FLIGHT, 5.0f, true); const Position EYE_DESTINATION_1 = { me->GetPositionX() - 40.0f, me->GetPositionY(), me->GetPositionZ() + 10.0f, 0.0f }; @@ -118,6 +122,10 @@ public: me->GetMotionMaster()->MovePoint(EYE_POINT_DESTINATION_1, EYE_DESTINATION_1); me->GetMotionMaster()->MovePoint(EYE_POINT_DESTINATION_2, EYE_DESTINATION_2); + if (Player* player = me->GetCharmerOrOwnerPlayerOrPlayerItself()) + { + player->RemoveAura(SPELL_EYE_OF_ACHERUS_VISUAL); + } break; } case EVENT_REGAIN_CONTROL: