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; }