Merge pull request #307 from noisiver/item-info

Make bots say messages about items configurable
This commit is contained in:
Yunfan Li
2024-07-07 00:31:30 +08:00
committed by GitHub
4 changed files with 8 additions and 0 deletions

View File

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

View File

@@ -317,6 +317,7 @@ bool PlayerbotAIConfig::Initialize()
syncLevelWithPlayers = sConfigMgr->GetOption<bool>("AiPlayerbot.SyncLevelWithPlayers", false);
freeFood = sConfigMgr->GetOption<bool>("AiPlayerbot.FreeFood", true);
randomBotSayWithoutMaster = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotSayWithoutMaster", false);
sayWhenCollectingItems = sConfigMgr->GetOption<bool>("AiPlayerbot.SayWhenCollectingItems", true);
randomBotGroupNearby = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotGroupNearby", true);
// arena

View File

@@ -201,6 +201,7 @@ class PlayerbotAIConfig
bool autoLearnQuestSpells;
bool autoTeleportForLevel;
bool randomBotSayWithoutMaster;
bool sayWhenCollectingItems;
bool randomBotGroupNearby;
uint32 tweakValue; //Debugging config

View File

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