Merge remote-tracking branch 'upstream/master' into more-chat-filters

This commit is contained in:
crow
2025-08-28 13:54:22 -05:00
3 changed files with 6 additions and 5 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -3244,7 +3244,7 @@ std::vector<uint32> PlayerbotFactory::GetCurrentGemsCount()
void PlayerbotFactory::InitFood()
{
if (!botAI->HasCheat(BotCheatMask::food))
if (botAI && botAI->HasCheat(BotCheatMask::food))
{
return;
}