From 45d046f4271c826f623d52f15bc6d5501b77e969 Mon Sep 17 00:00:00 2001 From: kadeshar Date: Thu, 28 Aug 2025 18:24:40 +0200 Subject: [PATCH 1/2] - 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 +} From 179c34e3a9ff48566e4da81e8fa59985f1f0b3b9 Mon Sep 17 00:00:00 2001 From: kadeshar Date: Thu, 28 Aug 2025 18:25:13 +0200 Subject: [PATCH 2/2] Food cheat fixes (#1594) * - Fixed bug with InitFood and food cheat - Fixed food cheat description in config * - Fixed bug with initself command --- conf/playerbots.conf.dist | 2 +- src/factory/PlayerbotFactory.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index 4d9e89d9..96161f5c 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -492,7 +492,7 @@ AiPlayerbot.AutoGearQualityLimit = 3 AiPlayerbot.AutoGearScoreLimit = 0 # Enable/Disable cheats for bots -# "food" (bots use cheat when eat or drink) +# "food" (bots eat or drink without using food or drinks from their inventory) # "gold" (bots have infinite gold) # "health" (bots have infinite health) # "mana" (bots have infinite mana) diff --git a/src/factory/PlayerbotFactory.cpp b/src/factory/PlayerbotFactory.cpp index b3ca0e9b..23d956cd 100644 --- a/src/factory/PlayerbotFactory.cpp +++ b/src/factory/PlayerbotFactory.cpp @@ -3244,7 +3244,7 @@ std::vector PlayerbotFactory::GetCurrentGemsCount() void PlayerbotFactory::InitFood() { - if (!botAI->HasCheat(BotCheatMask::food)) + if (botAI && botAI->HasCheat(BotCheatMask::food)) { return; }