Core/Quests: Removed slow queries from daily and weekly resets
Port From (https://github.com/TrinityCore/TrinityCore/commit/ee7b0e82fa076ad4338b1c362235cec6739f00e0)
This commit is contained in:
@@ -2016,17 +2016,6 @@ namespace Game
|
||||
player.DailyReset();
|
||||
}
|
||||
|
||||
StringBuilder questIds = new StringBuilder("DELETE cq, cqo FROM character_queststatus cq LEFT JOIN character_queststatus_objectives cqo ON cq.quest = cqo.quest WHERE cq.quest IN (");
|
||||
foreach (var (questId, quest) in Global.ObjectMgr.GetQuestTemplates())
|
||||
{
|
||||
if (quest.IsDaily() && quest.HasFlagEx(QuestFlagsEx.RemoveOnPeriodicReset))
|
||||
questIds.Append($"{questId},");
|
||||
}
|
||||
questIds.Append("0)");
|
||||
|
||||
DB.Characters.Execute(questIds.ToString());
|
||||
|
||||
|
||||
// reselect pools
|
||||
Global.QuestPoolMgr.ChangeDailyQuests();
|
||||
|
||||
@@ -2069,16 +2058,6 @@ namespace Game
|
||||
player.ResetWeeklyQuestStatus();
|
||||
}
|
||||
|
||||
StringBuilder questIds = new StringBuilder("DELETE cq, cqo FROM character_queststatus cq LEFT JOIN character_queststatus_objectives cqo ON cq.quest = cqo.quest WHERE cq.quest IN (");
|
||||
foreach (var (questId, quest) in Global.ObjectMgr.GetQuestTemplates())
|
||||
{
|
||||
if (quest.IsWeekly() && quest.HasFlagEx(QuestFlagsEx.RemoveOnWeeklyReset))
|
||||
questIds.Append($"{questId},");
|
||||
}
|
||||
questIds.Append("0)");
|
||||
|
||||
DB.Characters.Execute(questIds.ToString());
|
||||
|
||||
// reselect pools
|
||||
Global.QuestPoolMgr.ChangeWeeklyQuests();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user