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.
This commit is contained in:
Kelsi 2026-03-10 06:43:16 -07:00
parent 1e53369869
commit ac0fe1bd61

View file

@ -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)