mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 00:58:33 +00:00
Refactoring bot chat and sayaction caused by group crash <NOT FINISHED>
This commit is contained in:
@@ -281,8 +281,6 @@ void SuggestWhatToDoAction::spam(std::string msg, uint8 flags, bool worldChat, b
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!bot->IsInChannel(chn))
|
||||
chn->JoinChannel(bot, "");
|
||||
chn->Say(bot->GetGUID(), msg.c_str(), LANG_UNIVERSAL);
|
||||
}
|
||||
|
||||
@@ -291,9 +289,6 @@ void SuggestWhatToDoAction::spam(std::string msg, uint8 flags, bool worldChat, b
|
||||
std::string randomName = channelNames[urand(0, channelNames.size() - 1)];
|
||||
if (Channel* chn = cMgr->GetChannel(randomName, bot))
|
||||
{
|
||||
if (!bot->IsInChannel(chn))
|
||||
chn->JoinChannel(bot, "");
|
||||
|
||||
chn->Say(bot->GetGUID(), msg.c_str(), LANG_UNIVERSAL);
|
||||
}
|
||||
}
|
||||
@@ -305,11 +300,9 @@ void SuggestWhatToDoAction::spam(std::string msg, uint8 flags, bool worldChat, b
|
||||
}
|
||||
}
|
||||
|
||||
if (sPlayerbotAIConfig->randomBotGuildTalk && guild && bot->GetGuildId())
|
||||
if (sPlayerbotAIConfig->randomBotGuildTalk)
|
||||
{
|
||||
Guild* guild = sGuildMgr->GetGuildById(bot->GetGuildId());
|
||||
if (guild)
|
||||
guild->BroadcastToGuild(bot->GetSession(), false, msg.c_str(), LANG_UNIVERSAL);
|
||||
botAI->SayToGuild(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user