Scripts/Commands: Add .debug questreset to force daily/weekly/monthly quest reset.

Port From (https://github.com/TrinityCore/TrinityCore/commit/6f6cf975e4e0bef621b9465f364476ec6731ae0d)
This commit is contained in:
hondacrx
2022-01-20 12:39:18 -05:00
parent f87f58e35f
commit 62e4f1a7c5
2 changed files with 40 additions and 0 deletions
@@ -774,6 +774,41 @@ namespace Game.Chat
return true;
}
[Command("questreset", RBACPermissions.CommandDebugQuestreset)]
static bool HandleDebugQuestResetCommand(CommandHandler handler, string arg)
{
bool daily = false, weekly = false, monthly = false;
if (arg == "ALL")
daily = weekly = monthly = true;
else if (arg == "DAILY")
daily = true;
else if (arg == "WEEKLY")
weekly = true;
else if (arg == "MONTHLY")
monthly = true;
else
return false;
long now = GameTime.GetGameTime();
if (daily)
{
Global.WorldMgr.SetNextDailyQuestsResetTime(now);
handler.SendSysMessage("Daily quest reset scheduled for next tick.");
}
if (weekly)
{
Global.WorldMgr.SetNextWeeklyQuestsResetTime(now);
handler.SendSysMessage("Weekly quest reset scheduled for next tick.");
}
if (monthly)
{
Global.WorldMgr.SetNextMonthlyQuestsResetTime(now);
handler.SendSysMessage("Monthly quest reset scheduled for next tick.");
}
return true;
}
[Command("raidreset", RBACPermissions.CommandInstanceUnbind)]
static bool HandleDebugRaidResetCommand(CommandHandler handler, StringArguments args)
{