fix: clear lastInteractedGoGuid_ for non-lootable GO interactions

Mailboxes, doors, buttons, and other non-lootable GOs set shouldSendLoot=false
so no CMSG_LOOT is dispatched — but lastInteractedGoGuid_ was still set.
Without SMSG_LOOT_RESPONSE to clear it, a subsequent timed cast completion
(e.g. player buffs at the mailbox) would fire a spurious CMSG_LOOT for the
mailbox GUID.
This commit is contained in:
Kelsi 2026-03-13 05:06:00 -07:00
parent 6878f120e9
commit 01f4ef5e79

View file

@ -17446,6 +17446,11 @@ void GameHandler::performGameObjectInteractionNow(uint64_t guid) {
}
if (shouldSendLoot) {
lootTarget(guid);
} else {
// Non-lootable interaction (mailbox, door, button, etc.) — no CMSG_LOOT will be
// sent, and no SMSG_LOOT_RESPONSE will arrive to clear it. Clear the gather-loot
// guid now so a subsequent timed cast completion can't fire a spurious CMSG_LOOT.
lastInteractedGoGuid_ = 0;
}
// Retry use briefly to survive packet loss/order races.
const bool retryLoot = shouldSendLoot;