mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 09:07:19 +00:00
Refactoring bot chat and sayaction caused by group crash <NOT FINISHED>
This commit is contained in:
@@ -41,14 +41,9 @@ bool XpGainAction::Execute(Event event)
|
||||
Guild* guild = sGuildMgr->GetGuildById(bot->GetGuildId());
|
||||
if (guild)
|
||||
{
|
||||
std::string toSay = "";
|
||||
|
||||
if (urand(0, 3))
|
||||
toSay = "Wow I just killed " + creature->GetName() + " !";
|
||||
else
|
||||
toSay = "Awesome that " + creature->GetName() + " went down quickly !";
|
||||
|
||||
guild->BroadcastToGuild(bot->GetSession(), false, toSay, LANG_UNIVERSAL);
|
||||
std::map<std::string, std::string> args;
|
||||
args["%victim_name"] = creature->GetName();
|
||||
botAI->SayToGuild(BOT_TEXT2("broadcast_killed_rare", args));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user