Core/Quests: Unify quest objective updating into one function and replace iterating entire quest log to find objective with direct {type, id} lookup
Port From (https://github.com/TrinityCore/TrinityCore/commit/6352a84bf78a7afe0ea8d8caccee33dd09e09694)
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
using Framework.Constants;
|
||||
using Game.Achievements;
|
||||
using Game.BattleGrounds;
|
||||
using Game.Chat;
|
||||
using Game.DataStorage;
|
||||
using Game.Garrisons;
|
||||
@@ -25,9 +26,9 @@ using Game.Mails;
|
||||
using Game.Maps;
|
||||
using Game.Misc;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Game.BattleGrounds;
|
||||
|
||||
namespace Game.Entities
|
||||
{
|
||||
@@ -164,6 +165,7 @@ namespace Game.Entities
|
||||
List<uint> m_monthlyquests = new();
|
||||
MultiMap<uint, uint> m_seasonalquests = new();
|
||||
Dictionary<uint, QuestStatusData> m_QuestStatus = new();
|
||||
MultiMap<Tuple<QuestObjectiveType, int>, QuestObjectiveStatusData> m_questObjectiveStatus = new();
|
||||
Dictionary<uint, QuestSaveType> m_QuestStatusSave = new();
|
||||
List<uint> m_DFQuests = new();
|
||||
List<uint> m_RewardedQuests = new();
|
||||
@@ -625,4 +627,10 @@ namespace Game.Entities
|
||||
Deleted
|
||||
}
|
||||
}
|
||||
|
||||
struct QuestObjectiveStatusData
|
||||
{
|
||||
public KeyValuePair<uint, QuestStatusData> QuestStatusPair;
|
||||
public QuestObjective Objective;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user