Update DBC Structure for 322a
--HG-- branch : trunk
This commit is contained in:
+31
-14
@@ -100,6 +100,11 @@ DBCStorage <LockEntry> sLockStore(LockEntryfmt);
|
||||
|
||||
DBCStorage <MailTemplateEntry> sMailTemplateStore(MailTemplateEntryfmt);
|
||||
DBCStorage <MapEntry> sMapStore(MapEntryfmt);
|
||||
|
||||
// DBC used only for initialization sMapDifficultyMap at startup.
|
||||
DBCStorage <MapDifficultyEntry> sMapDifficultyStore(MapDifficultyEntryfmt); // only for loading
|
||||
MapDifficultyMap sMapDifficultyMap;
|
||||
|
||||
DBCStorage <MovieEntry> sMovieStore(MovieEntryfmt);
|
||||
|
||||
DBCStorage <QuestSortEntry> sQuestSortStore(QuestSortEntryfmt);
|
||||
@@ -133,7 +138,7 @@ TalentSpellPosMap sTalentSpellPosMap;
|
||||
DBCStorage <TalentTabEntry> sTalentTabStore(TalentTabEntryfmt);
|
||||
|
||||
// store absolute bit position for first rank for talent inspect
|
||||
static uint32 sTalentTabPages[12/*MAX_CLASSES*/][3];
|
||||
static uint32 sTalentTabPages[MAX_CLASSES][3];
|
||||
|
||||
DBCStorage <TaxiNodesEntry> sTaxiNodesStore(TaxiNodesEntryfmt);
|
||||
TaxiMask sTaxiNodesMask;
|
||||
@@ -143,10 +148,10 @@ TaxiMask sOldContinentsNodesMask;
|
||||
TaxiPathSetBySource sTaxiPathSetBySource;
|
||||
DBCStorage <TaxiPathEntry> sTaxiPathStore(TaxiPathEntryfmt);
|
||||
|
||||
// DBC used only for initialization sTaxiPathSetBySource at startup.
|
||||
// DBC used only for initialization sTaxiPathNodeStore at startup.
|
||||
TaxiPathNodesByPath sTaxiPathNodesByPath;
|
||||
|
||||
static DBCStorage <TaxiPathNodeEntry> sTaxiPathNodeStore(TaxiPathNodeEntryfmt);
|
||||
|
||||
DBCStorage <TotemCategoryEntry> sTotemCategoryStore(TotemCategoryEntryfmt);
|
||||
DBCStorage <VehicleEntry> sVehicleStore(VehicleEntryfmt);
|
||||
DBCStorage <VehicleSeatEntry> sVehicleSeatStore(VehicleSeatEntryfmt);
|
||||
@@ -210,7 +215,7 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
{
|
||||
std::string dbcPath = dataPath+"dbc/";
|
||||
|
||||
const uint32 DBCFilesCount = 79;
|
||||
const uint32 DBCFilesCount = 80;
|
||||
|
||||
barGoLink bar( DBCFilesCount );
|
||||
|
||||
@@ -243,7 +248,6 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sBattlemasterListStore, dbcPath,"BattlemasterList.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sBarberShopStyleStore, dbcPath,"BarberShopStyle.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCharStartOutfitStore, dbcPath,"CharStartOutfit.dbc");
|
||||
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCharTitlesStore, dbcPath,"CharTitles.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sChatChannelsStore, dbcPath,"ChatChannels.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sChrClassesStore, dbcPath,"ChrClasses.dbc");
|
||||
@@ -314,6 +318,14 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sLockStore, dbcPath,"Lock.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sMailTemplateStore, dbcPath,"MailTemplate.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sMapStore, dbcPath,"Map.dbc");
|
||||
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sMapDifficultyStore, dbcPath,"MapDifficulty.dbc");
|
||||
// fill data
|
||||
for(uint32 i = 1; i < sMapDifficultyStore.GetNumRows(); ++i)
|
||||
if(MapDifficultyEntry const* entry = sMapDifficultyStore.LookupEntry(i))
|
||||
sMapDifficultyMap[MAKE_PAIR32(entry->MapId,entry->Difficulty)] = MapDifficulty(entry->resetTime,entry->maxPlayers);
|
||||
sMapDifficultyStore.Clear();
|
||||
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sMovieStore, dbcPath,"Movie.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sQuestSortStore, dbcPath,"QuestSort.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sRandomPropertiesPointsStore, dbcPath,"RandPropPoints.dbc");
|
||||
@@ -322,7 +334,7 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSkillLineStore, dbcPath,"SkillLine.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSkillLineAbilityStore, dbcPath,"SkillLineAbility.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSoundEntriesStore, dbcPath,"SoundEntries.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellStore, dbcPath,"Spell.dbc", &CustomSpellEntryfmt, &CustomSpellEntryIndex);
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellStore, dbcPath,"Spell.dbc", &CustomSpellEntryfmt, &CustomSpellEntryIndex);
|
||||
for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
|
||||
{
|
||||
SpellEntry const * spell = sSpellStore.LookupEntry(i);
|
||||
@@ -506,18 +518,17 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
}
|
||||
|
||||
// Check loaded DBC files proper version
|
||||
if( !sSpellStore.LookupEntry(66530) || // last added spell in 3.1.3
|
||||
!sMapStore.LookupEntry(624) || // last map added in 3.1.3
|
||||
!sGemPropertiesStore.LookupEntry(1609) || // last gem property added in 3.1.3
|
||||
!sItemExtendedCostStore.LookupEntry(2671) || // last item extended cost added in 3.1.3
|
||||
!sCharTitlesStore.LookupEntry(166) || // last char title added in 3.1.3
|
||||
!sAreaStore.LookupEntry(2905) || // last area (areaflag) added in 3.1.3
|
||||
!sItemStore.LookupEntry(46894) ) // last client known item added in 3.1.3
|
||||
if( !sSpellStore.LookupEntry(69599) || // last added spell in 3.2.2
|
||||
!sMapStore.LookupEntry(650) || // last map added in 3.2.2
|
||||
!sGemPropertiesStore.LookupEntry(1629) || // last gem property added in 3.2.2
|
||||
!sItemExtendedCostStore.LookupEntry(2723) || // last item extended cost added in 3.2.2
|
||||
!sCharTitlesStore.LookupEntry(171) || // last char title added in 3.2.2
|
||||
!sAreaStore.LookupEntry(3091) || // last area (areaflag) added in 3.2.2
|
||||
!sItemStore.LookupEntry(49667) ) // last client known item added in 3.2.2
|
||||
{
|
||||
sLog.outError("\nYou have _outdated_ DBC files. Please extract correct versions from current using client.");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString( ">> Initialized %d data stores", DBCFilesCount );
|
||||
}
|
||||
@@ -695,6 +706,12 @@ void Map2ZoneCoordinates(float& x,float& y,uint32 zone)
|
||||
std::swap(x,y); // client have map coords swapped
|
||||
}
|
||||
|
||||
MapDifficulty const* GetMapDifficultyData(uint32 mapId, Difficulty difficulty)
|
||||
{
|
||||
MapDifficultyMap::const_iterator itr = sMapDifficultyMap.find(MAKE_PAIR32(mapId,difficulty));
|
||||
return itr != sMapDifficultyMap.end() ? &itr->second : NULL;
|
||||
}
|
||||
|
||||
uint32 const* GetTalentTabPages(uint8 cls)
|
||||
{
|
||||
return sTalentTabPages[cls];
|
||||
|
||||
Reference in New Issue
Block a user