From e8b5b1fcb402a52c1684329495ca3543163c7e55 Mon Sep 17 00:00:00 2001 From: Revision Date: Fri, 5 Jul 2024 17:27:14 +0200 Subject: [PATCH] Item Info Make the messages the bots send regarding items they loot etc configurable --- conf/playerbots.conf.dist | 3 +++ src/PlayerbotAIConfig.cpp | 1 + src/PlayerbotAIConfig.h | 1 + src/strategy/actions/QueryItemUsageAction.cpp | 3 +++ 4 files changed, 8 insertions(+) diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index fa867e68..7d4f9a34 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -141,6 +141,9 @@ AiPlayerbot.RandomBotGroupNearby = 0 # Bots without a master will say their lines AiPlayerbot.RandomBotSayWithoutMaster = 0 +# Bots will say information about items when collecting them +AiPlayerbot.SayWhenCollectingItems = 1 + # Set RandomBotMaxLevel bots to RandomBotMinLevel or not AiPlayerbot.DowngradeMaxLevelBot = 0 diff --git a/src/PlayerbotAIConfig.cpp b/src/PlayerbotAIConfig.cpp index 96142144..34e7a1bb 100644 --- a/src/PlayerbotAIConfig.cpp +++ b/src/PlayerbotAIConfig.cpp @@ -317,6 +317,7 @@ bool PlayerbotAIConfig::Initialize() syncLevelWithPlayers = sConfigMgr->GetOption("AiPlayerbot.SyncLevelWithPlayers", false); freeFood = sConfigMgr->GetOption("AiPlayerbot.FreeFood", true); randomBotSayWithoutMaster = sConfigMgr->GetOption("AiPlayerbot.RandomBotSayWithoutMaster", false); + sayWhenCollectingItems = sConfigMgr->GetOption("AiPlayerbot.SayWhenCollectingItems", true); randomBotGroupNearby = sConfigMgr->GetOption("AiPlayerbot.RandomBotGroupNearby", true); // arena diff --git a/src/PlayerbotAIConfig.h b/src/PlayerbotAIConfig.h index cc5e72be..40a66034 100644 --- a/src/PlayerbotAIConfig.h +++ b/src/PlayerbotAIConfig.h @@ -201,6 +201,7 @@ class PlayerbotAIConfig bool autoLearnQuestSpells; bool autoTeleportForLevel; bool randomBotSayWithoutMaster; + bool sayWhenCollectingItems; bool randomBotGroupNearby; uint32 tweakValue; //Debugging config diff --git a/src/strategy/actions/QueryItemUsageAction.cpp b/src/strategy/actions/QueryItemUsageAction.cpp index 52e390f3..1357d914 100644 --- a/src/strategy/actions/QueryItemUsageAction.cpp +++ b/src/strategy/actions/QueryItemUsageAction.cpp @@ -13,6 +13,9 @@ bool QueryItemUsageAction::Execute(Event event) if (!GetMaster() && !sPlayerbotAIConfig->randomBotSayWithoutMaster) return false; + if (!sPlayerbotAIConfig->sayWhenCollectingItems) + return false; + WorldPacket& data = event.getPacket(); if (!data.empty()) {