From ac0fe1bd615c9b2c7f29038865bb456212d48807 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 10 Mar 2026 06:43:16 -0700 Subject: [PATCH] game: clear target auras when switching targets setTarget() was not clearing targetAuras, leaving stale buff/debuff icons from the previous target visible on the buff bar until the server sent SMSG_AURA_UPDATE_ALL for the new target. Reset all slots to empty on target change so the display is immediately correct. --- src/game/game_handler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 78089bd7..75440ff7 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -8760,6 +8760,10 @@ void GameHandler::setTarget(uint64_t guid) { targetGuid = guid; + // Clear stale aura data from the previous target so the buff bar shows + // an empty state until the server sends SMSG_AURA_UPDATE_ALL for the new target. + for (auto& slot : targetAuras) slot = AuraSlot{}; + // Clear previous target's cast bar on target change // (the new target's cast state is naturally fetched from unitCastStates_ by GUID)