mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 00:20:16 +00:00
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:
parent
98212a3f91
commit
c998ed6335
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue