Core/Globals: some changes in quest loading
- Made load/reload associated quest tables data-driven, so removed a bunch of similar looking code from ObjectMgr (yay!) - Codestyle and encapsulation for ExclusiveQuestGroups
This commit is contained in:
1 parent
ef6f5abf75
commit
330f399de3
5 files changed
+73
-108
No files matched your search
@@ -596,6 +596,9 @@ 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;
|
||||
|
||||
typedef std::multimap<int32, uint32> ExclusiveQuestGroups; // exclusiveGroupId -> quest
|
||||
typedef std::pair<ExclusiveQuestGroups::const_iterator, ExclusiveQuestGroups::const_iterator> ExclusiveQuestGroupsBounds;
|
||||
|
||||
struct PlayerCreateInfoItem
|
||||
{
|
||||
PlayerCreateInfoItem(uint32 id, uint32 amount) : item_id(id), item_amount(amount) { }
|
||||
@@ -1125,6 +1128,11 @@ class TC_GAME_API ObjectMgr
|
||||
return _creatureQuestInvolvedRelationsReverse.equal_range(questId);
|
||||
}
|
||||
|
||||
ExclusiveQuestGroupsBounds GetExclusiveQuestGroupBounds(int32 exclusiveGroupId) const
|
||||
{
|
||||
return _exclusiveQuestGroups.equal_range(exclusiveGroupId);
|
||||
}
|
||||
|
||||
bool LoadTrinityStrings();
|
||||
|
||||
void LoadEventScripts();
|
||||
@@ -1261,11 +1269,6 @@ class TC_GAME_API ObjectMgr
|
||||
Trinity::IteratorPair<SpawnGroupLinkContainer::const_iterator> GetSpawnDataForGroup(uint32 groupId) const { return Trinity::Containers::MapEqualRange(_spawnGroupMapStore, groupId); }
|
||||
std::vector<InstanceSpawnGroupInfo> const* GetSpawnGroupsForInstance(uint32 instanceId) const { auto it = _instanceSpawnGroupStore.find(instanceId); return it != _instanceSpawnGroupStore.end() ? &it->second : nullptr; }
|
||||
|
||||
typedef std::multimap<int32, uint32> ExclusiveQuestGroups;
|
||||
typedef std::pair<ExclusiveQuestGroups::const_iterator, ExclusiveQuestGroups::const_iterator> ExclusiveQuestGroupsBounds;
|
||||
|
||||
ExclusiveQuestGroups mExclusiveQuestGroups;
|
||||
|
||||
MailLevelReward const* GetMailLevelReward(uint32 level, uint32 raceMask) const
|
||||
{
|
||||
MailLevelRewardContainer::const_iterator map_itr = _mailLevelRewardStore.find(level);
|
||||
@@ -1623,6 +1626,8 @@ class TC_GAME_API ObjectMgr
|
||||
QuestRelations _creatureQuestInvolvedRelations;
|
||||
QuestRelationsReverse _creatureQuestInvolvedRelationsReverse;
|
||||
|
||||
ExclusiveQuestGroups _exclusiveQuestGroups;
|
||||
|
||||
//character reserved names
|
||||
typedef std::set<std::wstring> ReservedNamesContainer;
|
||||
ReservedNamesContainer _reservedNamesStore;
|
||||
|
||||
Reference in new issue
Block a user