From 8a1666aa8880d61980cc600d40fd7ff4f6b6b30d Mon Sep 17 00:00:00 2001 From: Warlockbugs Date: Sun, 4 Jun 2023 23:24:50 +0300 Subject: [PATCH] Fix Possess action bars regression Also expand the comment a bit on why we grant control in this context --- src/game/Entities/Unit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/Entities/Unit.cpp b/src/game/Entities/Unit.cpp index 3ca7d0dbc7..1c73b88483 100644 --- a/src/game/Entities/Unit.cpp +++ b/src/game/Entities/Unit.cpp @@ -11112,7 +11112,7 @@ Unit* Unit::TakePossessOf(SpellEntry const* spellEntry, uint32 effIdx, float x, player->UnsummonPetTemporaryIfAny(); player->GetCamera().SetView(possessed); // modify camera view to the creature view - // Force client control (required to function propely) + // Force granting client control (required for action bars to function propely, will be taken away on demand after action bars update below) player->UpdateClientControl(possessed, true, true); // transfer client control to the creature after altering flags player->SetMover(possessed); // set mover so now we know that creature is "moved" by this unit player->SendForcedObjectUpdate(); // we have to update client data here to avoid problem with the "release spirit" windows reappear. @@ -11253,8 +11253,8 @@ bool Unit::TakePossessOf(Unit* possessed) if (player) { player->GetCamera().SetView(possessed); - // Force client control (required to function propely) - player->UpdateClientControl(possessed, !IsCrowdControlled(), true); + // Force granting client control (required for action bars to function propely, will be taken away on demand after action bars update below) + player->UpdateClientControl(possessed, true, true); player->SetMover(possessed); player->SendForcedObjectUpdate();