Refactoring bot chat and sayaction caused by group crash <NOT FINISHED>

This commit is contained in:
Atidot3
2024-07-31 22:39:59 +02:00
parent f96f909b6e
commit 79d0f3fd28
10 changed files with 482 additions and 208 deletions

View File

@@ -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));
}
}
}