From 29ecbcddb2d668b9a649d8e66378598b632eaf0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E4=BD=A9=E8=8C=B9?= Date: Thu, 23 Mar 2023 09:13:13 -0600 Subject: [PATCH] Fix bots not looting non-quest items --- src/LootObjectStack.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/LootObjectStack.cpp b/src/LootObjectStack.cpp index 2f915ae1..e3f75ae0 100644 --- a/src/LootObjectStack.cpp +++ b/src/LootObjectStack.cpp @@ -83,12 +83,9 @@ void LootObject::Refresh(Player* bot, ObjectGuid lootGUID) bool isQuestItemOnly = false; GameObjectQuestItemList const* items = sObjectMgr->GetGameObjectQuestItemList(go->GetEntry()); - if (!items) - return; - for (int i = 0; i < MAX_GAMEOBJECT_QUEST_ITEMS; i++) { - if (i >= items->size()) + if (!items || i >= items->size()) break; auto itemId = uint32((*items)[i]);