feat(Core/Commands): add honor and arena point reset to .reset all … (#24978)

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Andrew
2026-03-03 12:21:37 -03:00
committed by GitHub
parent 4dce54c9a5
commit 82781f24a9
5 changed files with 43 additions and 1 deletions

View File

@@ -286,6 +286,34 @@ public:
if (!handler->GetSession())
handler->SendSysMessage(LANG_RESETALL_TALENTS);
}
else if (caseName == "honor")
{
CharacterDatabase.Execute(CharacterDatabase.GetPreparedStatement(CHAR_UPD_ALL_HONOR_POINTS));
sWorldSessionMgr->DoForAllOnlinePlayers([](Player* player)
{
player->SetHonorPoints(0);
});
handler->SendWorldText(LANG_RESETALL_HONOR);
if (!handler->GetSession())
handler->SendSysMessage(LANG_RESETALL_HONOR);
return true;
}
else if (caseName == "arena")
{
CharacterDatabase.Execute(CharacterDatabase.GetPreparedStatement(CHAR_UPD_ALL_ARENA_POINTS));
sWorldSessionMgr->DoForAllOnlinePlayers([](Player* player)
{
player->SetArenaPoints(0);
});
handler->SendWorldText(LANG_RESETALL_ARENA);
if (!handler->GetSession())
handler->SendSysMessage(LANG_RESETALL_ARENA);
return true;
}
else
{
handler->SendErrorMessage(LANG_RESETALL_UNKNOWN_CASE, caseName);