Fix looting of chest-type gameobjects

- send CMSG_LOOT after CMSG_GAMEOBJECT_USE for lootable GO types (chest/fishing hole)
- keeps mailbox handling unchanged
This commit is contained in:
Kelsi 2026-02-18 04:07:47 -08:00
parent 98212a3f91
commit c998ed6335

View file

@ -8032,6 +8032,11 @@ void GameHandler::interactWithGameObject(uint64_t guid) {
if (entity && entity->getType() == ObjectType::GAMEOBJECT) {
auto go = std::static_pointer_cast<GameObject>(entity);
auto* info = getCachedGameObjectInfo(go->getEntry());
if (info && (info->type == 3 || info->type == 25)) {
// Lootable objects (e.g., chests/fishing holes) on some cores require
// explicit CMSG_LOOT in addition to CMSG_GAMEOBJECT_USE.
lootTarget(guid);
}
if (info && info->type == 19) {
LOG_INFO("Mailbox interaction: opening mail UI and requesting mail list");
mailboxGuid_ = guid;