diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/DataStores/DB2Stores.cpp | 11 | ||||
-rw-r--r-- | src/server/game/DataStores/DB2Stores.h | 2 | ||||
-rw-r--r-- | src/server/game/DataStores/DB2Structure.h | 1 | ||||
-rw-r--r-- | src/server/game/DataStores/DBCStores.cpp | 13 | ||||
-rw-r--r-- | src/server/game/DataStores/DBCStores.h | 2 | ||||
-rw-r--r-- | src/server/game/DataStores/DBCStructure.h | 2 |
6 files changed, 14 insertions, 17 deletions
diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp index 51669deef9d..2d3751ccd9e 100644 --- a/src/server/game/DataStores/DB2Stores.cpp +++ b/src/server/game/DataStores/DB2Stores.cpp @@ -52,6 +52,7 @@ TaxiMask sAllianceTaxiNodesMask; TaxiMask sDeathKnightTaxiNodesMask; TaxiPathSetBySource sTaxiPathSetBySource; TaxiPathNodesByPath sTaxiPathNodesByPath; +PhaseGroupContainer sPhasesByGroup; typedef std::list<std::string> DB2StoreProblemList; @@ -142,6 +143,11 @@ void LoadDB2Stores(std::string const& dataPath) LoadDB2(availableDb2Locales, bad_db2_files, sTaxiNodesStore, db2Path, "TaxiNodes.db2"); LoadDB2(availableDb2Locales, bad_db2_files, sTaxiPathStore, db2Path, "TaxiPath.db2"); LoadDB2(availableDb2Locales, bad_db2_files, sTaxiPathNodeStore, db2Path, "TaxiPathNode.db2"); + + for (uint32 i = 0; i < sPhaseGroupStore.GetNumRows(); ++i) + if (PhaseGroupEntry const* group = sPhaseGroupStore.LookupEntry(i)) + if (PhaseEntry const* phase = sPhaseStore.LookupEntry(group->PhaseID)) + sPhasesByGroup[group->PhaseGroupID].insert(phase->ID); for (uint32 i = 0; i < sItemAppearanceStore.GetNumRows(); ++i) if (ItemAppearanceEntry const* entry = sItemAppearanceStore.LookupEntry(i)) @@ -277,3 +283,8 @@ uint32 GetItemDisplayID(uint32 appearanceID) return itr->second; return 0; } + +std::set<uint32> const& GetPhasesForGroup(uint32 group) +{ + return sPhasesByGroup[group]; +} diff --git a/src/server/game/DataStores/DB2Stores.h b/src/server/game/DataStores/DB2Stores.h index 29fe93ce2b1..4294636b138 100644 --- a/src/server/game/DataStores/DB2Stores.h +++ b/src/server/game/DataStores/DB2Stores.h @@ -59,4 +59,6 @@ DB2StorageBase const* GetDB2Storage(uint32 type); uint32 GetItemDisplayID(uint32 appearanceID); +std::set<uint32> const& GetPhasesForGroup(uint32 group); + #endif diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h index b6407b1a0ae..dbd9f3ff1d8 100644 --- a/src/server/game/DataStores/DB2Structure.h +++ b/src/server/game/DataStores/DB2Structure.h @@ -379,4 +379,5 @@ typedef std::vector<TaxiPathNodeList> TaxiPathNodesByPath; #define TaxiMaskSize 114 typedef uint8 TaxiMask[TaxiMaskSize]; +typedef std::unordered_map<uint32, std::set<uint32>> PhaseGroupContainer; #endif
\ No newline at end of file diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index ad716f7f74a..325a1d9a6db 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -17,7 +17,6 @@ */ #include "DBCStores.h" -#include "DB2Stores.h" #include "Containers.h" #include "Log.h" #include "SharedDefines.h" @@ -230,8 +229,6 @@ DBCStorage <WorldMapOverlayEntry> sWorldMapOverlayStore(WorldMapOverlayEntryfmt) DBCStorage <WorldSafeLocsEntry> sWorldSafeLocsStore(WorldSafeLocsEntryfmt); DBCStorage <PhaseEntry> sPhaseStore(PhaseEntryfmt); -PhaseGroupContainer sPhasesByGroup; - typedef std::list<std::string> StoreProblemList; uint32 DBCFileCount = 0; @@ -479,11 +476,6 @@ void LoadDBCStores(const std::string& dataPath) LoadDBC(availableDbcLocales, bad_dbc_files, sPhaseStore, dbcPath, "Phase.dbc"); // 19116 - for (uint32 i = 0; i < sPhaseGroupStore.GetNumRows(); ++i) - if (PhaseGroupEntry const* group = sPhaseGroupStore.LookupEntry(i)) - if (PhaseEntry const* phase = sPhaseStore.LookupEntry(group->PhaseID)) - sPhasesByGroup[group->PhaseGroupID].insert(phase->ID); - LoadDBC(availableDbcLocales, bad_dbc_files, sPowerDisplayStore, dbcPath, "PowerDisplay.dbc");//19116 LoadDBC(availableDbcLocales, bad_dbc_files, sPvPDifficultyStore, dbcPath, "PvpDifficulty.dbc");//19116 @@ -1178,8 +1170,3 @@ SkillRaceClassInfoEntry const* GetSkillRaceClassInfo(uint32 skill, uint8 race, u return NULL; } - -std::set<uint32> const& GetPhasesForGroup(uint32 group) -{ - return sPhasesByGroup[group]; -} diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h index e9a9b3c692f..5bbccf830d6 100644 --- a/src/server/game/DataStores/DBCStores.h +++ b/src/server/game/DataStores/DBCStores.h @@ -83,8 +83,6 @@ LFGDungeonEntry const* GetLFGDungeon(uint32 mapId, Difficulty difficulty); uint32 GetDefaultMapLight(uint32 mapId); -std::set<uint32> const& GetPhasesForGroup(uint32 group); - typedef std::unordered_multimap<uint32, SkillRaceClassInfoEntry const*> SkillRaceClassInfoMap; typedef std::pair<SkillRaceClassInfoMap::iterator, SkillRaceClassInfoMap::iterator> SkillRaceClassInfoBounds; SkillRaceClassInfoEntry const* GetSkillRaceClassInfo(uint32 skill, uint8 race, uint8 class_); diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index b3ea9814cf3..0c83b13a5bb 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -2371,6 +2371,4 @@ struct MapDifficulty }; typedef std::map<uint32, uint32> TalentSpellPosMap; - -typedef std::unordered_map<uint32, std::set<uint32>> PhaseGroupContainer; #endif |