From 45d046f4271c826f623d52f15bc6d5501b77e969 Mon Sep 17 00:00:00 2001 From: kadeshar Date: Thu, 28 Aug 2025 18:24:40 +0200 Subject: [PATCH] - Fixed bug where bot looting gameobject which is on respawn time (#1596) --- src/LootObjectStack.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/LootObjectStack.cpp b/src/LootObjectStack.cpp index adce7f39..b7d0caf9 100644 --- a/src/LootObjectStack.cpp +++ b/src/LootObjectStack.cpp @@ -299,9 +299,10 @@ bool LootObject::IsLootPossible(Player* bot) return false; } - // Prevent bot from running to chests that are unlootable (e.g. Gunship Armory before completing the event) + // Prevent bot from running to chests that are unlootable (e.g. Gunship Armory before completing the event) or on + // respawn time GameObject* go = botAI->GetGameObject(guid); - if (go && go->HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND | GO_FLAG_NOT_SELECTABLE)) + if (go && (go->HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND | GO_FLAG_NOT_SELECTABLE) || !go->isSpawned())) return false; if (skillId == SKILL_NONE) @@ -407,4 +408,4 @@ LootObject LootObjectStack::GetNearest(float maxDistance) } return nearest; -} \ No newline at end of file +}