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:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -2405,7 +2405,12 @@ namespace Game
|
||||
public void SetDataPath(string path) { _dataPath = path; }
|
||||
|
||||
public long GetNextDailyQuestsResetTime() { return m_NextDailyQuestReset; }
|
||||
public void SetNextDailyQuestsResetTime(long time) { m_NextDailyQuestReset = time; }
|
||||
public long GetNextWeeklyQuestsResetTime() { return m_NextWeeklyQuestReset; }
|
||||
public void SetNextWeeklyQuestsResetTime(long time) { m_NextWeeklyQuestReset = time; }
|
||||
public long GetNextMonthlyQuestsResetTime() { return m_NextMonthlyQuestReset; }
|
||||
public void SetNextMonthlyQuestsResetTime(long time) { m_NextMonthlyQuestReset = time; }
|
||||
|
||||
long GetNextRandomBGResetTime() { return m_NextRandomBGReset; }
|
||||
|
||||
public uint GetConfigMaxSkillValue()
|
||||
|
||||
Reference in New Issue
Block a user