Add parameters to allow bot to talk in guild + fix multi guild same message + bot in group wont ask for dungeon

This commit is contained in:
Atidot3
2024-07-28 20:43:17 +02:00
parent 1128e0280a
commit cf9dca6b16
7 changed files with 14 additions and 10 deletions

View File

@@ -306,13 +306,13 @@ void SuggestWhatToDoAction::spam(std::string msg, uint8 flags, bool worldChat, b
if (Channel* worldChannel = cMgr->GetChannel("World", bot))
worldChannel->Say(bot->GetGUID(), msg.c_str(), LANG_UNIVERSAL);
}
}
if (guild && bot->GetGuildId())
{
Guild* guild = sGuildMgr->GetGuildById(bot->GetGuildId());
if (guild)
guild->BroadcastToGuild(bot->GetSession(), false, msg.c_str(), LANG_UNIVERSAL);
}
if (sPlayerbotAIConfig->randomBotGuildTalk && guild && bot->GetGuildId())
{
Guild* guild = sGuildMgr->GetGuildById(bot->GetGuildId());
if (guild)
guild->BroadcastToGuild(bot->GetSession(), false, msg.c_str(), LANG_UNIVERSAL);
}
}
@@ -355,6 +355,8 @@ bool SuggestDungeonAction::Execute(Event event)
{
// TODO: use sPlayerbotDungeonSuggestionMgr
if (!sPlayerbotAIConfig->randomBotSuggestDungeons || bot->GetGroup()) return false;
if (instances.empty())
{
instances["Ragefire Chasm"] = 15;