aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Globals/ObjectMgr.h
diff options
context:
space:
mode:
authorDDuarte <dnpd.dd@gmail.com>2014-09-01 19:06:28 +0100
committerDDuarte <dnpd.dd@gmail.com>2014-09-01 19:06:28 +0100
commit5ca5a75d21ba6f79c9c83d1e1b6a84da88f65dc0 (patch)
tree49ac196a924095ded40248fa4c726355adc8d574 /src/server/game/Globals/ObjectMgr.h
parente85f73c8162a4fdc7d7a8fe2667b6f867cb7c721 (diff)
Core/Quests: Add methods to get a list of npcs/GOs that end (involved relation) a given a quest
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.h')
-rw-r--r--src/server/game/Globals/ObjectMgr.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h
index 56ae4a4c6d1..dc9196dd0df 100644
--- a/src/server/game/Globals/ObjectMgr.h
+++ b/src/server/game/Globals/ObjectMgr.h
@@ -492,8 +492,10 @@ typedef std::unordered_map<int32, TrinityStringLocale> TrinityStringLocaleContai
typedef std::unordered_map<uint32, GossipMenuItemsLocale> GossipMenuItemsLocaleContainer;
typedef std::unordered_map<uint32, PointOfInterestLocale> PointOfInterestLocaleContainer;
-typedef std::multimap<uint32, uint32> QuestRelations;
+typedef std::multimap<uint32, uint32> QuestRelations; // unit/go -> quest
+typedef std::multimap<uint32, uint32> QuestRelationsReverse; // quest -> unit/go
typedef std::pair<QuestRelations::const_iterator, QuestRelations::const_iterator> QuestRelationBounds;
+typedef std::pair<QuestRelationsReverse::const_iterator, QuestRelationsReverse::const_iterator> QuestRelationReverseBounds;
struct PetLevelInfo
{
@@ -930,6 +932,11 @@ class ObjectMgr
return _goQuestInvolvedRelations.equal_range(go_entry);
}
+ QuestRelationReverseBounds GetGOQuestInvolvedRelationReverseBounds(uint32 questId)
+ {
+ return _goQuestInvolvedRelationsReverse.equal_range(questId);
+ }
+
QuestRelations* GetCreatureQuestRelationMap()
{
return &_creatureQuestRelations;
@@ -945,6 +952,11 @@ class ObjectMgr
return _creatureQuestInvolvedRelations.equal_range(creature_entry);
}
+ QuestRelationReverseBounds GetCreatureQuestInvolvedRelationReverseBounds(uint32 questId)
+ {
+ return _creatureQuestInvolvedRelationsReverse.equal_range(questId);
+ }
+
void LoadEventScripts();
void LoadSpellScripts();
void LoadWaypointScripts();
@@ -1347,8 +1359,10 @@ class ObjectMgr
QuestRelations _goQuestRelations;
QuestRelations _goQuestInvolvedRelations;
+ QuestRelationsReverse _goQuestInvolvedRelationsReverse;
QuestRelations _creatureQuestRelations;
QuestRelations _creatureQuestInvolvedRelations;
+ QuestRelationsReverse _creatureQuestInvolvedRelationsReverse;
//character reserved names
typedef std::set<std::wstring> ReservedNamesContainer;
@@ -1373,7 +1387,7 @@ class ObjectMgr
private:
void LoadScripts(ScriptsType type);
void CheckScripts(ScriptsType type, std::set<int32>& ids);
- void LoadQuestRelationsHelper(QuestRelations& map, std::string const& table, bool starter, bool go);
+ void LoadQuestRelationsHelper(QuestRelations& map, QuestRelationsReverse* reverseMap, std::string const& table, bool starter, bool go);
void PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint32 itemId, int32 count);
MailLevelRewardContainer _mailLevelRewardStore;