mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
Core/DBC: Move sPhasesByGroupStore and access method to DB2Stores
DB2Stores were not loaded yet at the old position.
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
@@ -59,4 +59,6 @@ DB2StorageBase const* GetDB2Storage(uint32 type);
|
||||
|
||||
uint32 GetItemDisplayID(uint32 appearanceID);
|
||||
|
||||
std::set<uint32> const& GetPhasesForGroup(uint32 group);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -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
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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_);
|
||||
|
||||
@@ -2371,6 +2371,4 @@ struct MapDifficulty
|
||||
};
|
||||
|
||||
typedef std::map<uint32, uint32> TalentSpellPosMap;
|
||||
|
||||
typedef std::unordered_map<uint32, std::set<uint32>> PhaseGroupContainer;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user