mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 19:05:42 +00:00
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>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user