From 72a4681929ca72479d7145bd0395c62a9834e0e5 Mon Sep 17 00:00:00 2001 From: Karrz1 <127596890+Karrz1@users.noreply.github.com> Date: Mon, 16 Nov 2026 18:54:59 +0000 Subject: [PATCH] Bots: quest items from personal-loot chests count as chest sources Most quest chests of the current client give their item as personal loot (chest data 30). The objective locator only read the legacy loot id, so bots never found those chests for item objectives. --- src/modules/PlayerbotV2/Bot/QuestObjectiveLocations.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/PlayerbotV2/Bot/QuestObjectiveLocations.cpp b/src/modules/PlayerbotV2/Bot/QuestObjectiveLocations.cpp index 3a548ed33b..e5a36c01e5 100644 --- a/src/modules/PlayerbotV2/Bot/QuestObjectiveLocations.cpp +++ b/src/modules/PlayerbotV2/Bot/QuestObjectiveLocations.cpp @@ -355,8 +355,14 @@ void LoadLoot(BuildCtx& ctx) std::unordered_map> go_loot_ids; for (auto const& [entry, gt] : sObjectMgr->GetGameObjectTemplates()) + { if (uint32 loot = gt.GetLootId()) go_loot_ids[loot].push_back(entry); + // Most quest chests of the current client hand out their items as personal loot (chest data 30), not through the + // legacy shared loot id, and GetLootId() does not return that one. + if (gt.type == GAMEOBJECT_TYPE_CHEST && gt.chest.chestPersonalLoot && gt.chest.chestPersonalLoot != gt.GetLootId()) + go_loot_ids[gt.chest.chestPersonalLoot].push_back(entry); + } LoadLootTable("creature_loot_template", creature_loot_ids, ctx.item_creatures_loot, ctx.item_creatures_loot_qr); LoadLootTable("gameobject_loot_template", go_loot_ids, ctx.item_gos_loot, ctx.item_gos_loot_qr);