diff options
author | QAston <none@none> | 2009-08-18 20:17:06 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-08-18 20:17:06 +0200 |
commit | 5ffa85c858fb721fb5d663431712d173d6b62a15 (patch) | |
tree | 2344baec6dfc3bf569b9318d6b278ae02d3c5b9a /src | |
parent | d3d2eb91bbac388f9ffc1e89147c4129e7bcf9af (diff) |
*Fix server startup error from 5184.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/DBCStores.cpp | 4 | ||||
-rw-r--r-- | src/shared/Database/DBCFileLoader.cpp | 4 | ||||
-rw-r--r-- | src/shared/Database/DBCFileLoader.h | 2 | ||||
-rw-r--r-- | src/shared/Database/DBCStore.h | 4 |
4 files changed, 6 insertions, 8 deletions
diff --git a/src/game/DBCStores.cpp b/src/game/DBCStores.cpp index 1ecc5ef8dd0..60236f786c7 100644 --- a/src/game/DBCStores.cpp +++ b/src/game/DBCStores.cpp @@ -165,13 +165,13 @@ static bool LoadDBC_assert_print(uint32 fsize,uint32 rsize, const std::string& f } template<class T> -inline void LoadDBC(uint32& availableDbcLocales,barGoLink& bar, StoreProblemList& errlist, DBCStorage<T>& storage, const std::string& dbc_path, const std::string& filename, uint32 customEntriesCount = 0) +inline void LoadDBC(uint32& availableDbcLocales,barGoLink& bar, StoreProblemList& errlist, DBCStorage<T>& storage, const std::string& dbc_path, const std::string& filename) { // compatibility format and C++ structure sizes assert(DBCFileLoader::GetFormatRecordSize(storage.GetFormat()) == sizeof(T) || LoadDBC_assert_print(DBCFileLoader::GetFormatRecordSize(storage.GetFormat()),sizeof(T),filename)); std::string dbc_filename = dbc_path + filename; - if(storage.Load(dbc_filename.c_str()), customEntriesCount) + if(storage.Load(dbc_filename.c_str())) { bar.step(); for(uint8 i = 0; i < MAX_LOCALE; ++i) diff --git a/src/shared/Database/DBCFileLoader.cpp b/src/shared/Database/DBCFileLoader.cpp index dc968fbce3b..23f602f5c93 100644 --- a/src/shared/Database/DBCFileLoader.cpp +++ b/src/shared/Database/DBCFileLoader.cpp @@ -30,7 +30,7 @@ DBCFileLoader::DBCFileLoader() fieldsOffset = NULL; } -bool DBCFileLoader::Load(const char *filename, const char *fmt, uint32 customEntriesCount) +bool DBCFileLoader::Load(const char *filename, const char *fmt) { uint32 header; @@ -55,8 +55,6 @@ bool DBCFileLoader::Load(const char *filename, const char *fmt, uint32 customEnt EndianConvert(recordCount); - recordCount += customEntriesCount; - if(fread(&fieldCount,4,1,f)!=1) // Number of fields return false; diff --git a/src/shared/Database/DBCFileLoader.h b/src/shared/Database/DBCFileLoader.h index ebdfef4523c..13562148dfc 100644 --- a/src/shared/Database/DBCFileLoader.h +++ b/src/shared/Database/DBCFileLoader.h @@ -41,7 +41,7 @@ class DBCFileLoader DBCFileLoader(); ~DBCFileLoader(); - bool Load(const char *filename, const char *fmt, uint32 customEntriesCount = 0); + bool Load(const char *filename, const char *fmt); class Record { diff --git a/src/shared/Database/DBCStore.h b/src/shared/Database/DBCStore.h index 2906a93edbc..523d5c5a0b3 100644 --- a/src/shared/Database/DBCStore.h +++ b/src/shared/Database/DBCStore.h @@ -34,11 +34,11 @@ class DBCStorage char const* GetFormat() const { return fmt; } uint32 GetFieldCount() const { return fieldCount; } - bool Load(char const* fn, uint32 customEntriesCount = 0) + bool Load(char const* fn) { DBCFileLoader dbc; // Check if load was sucessful, only then continue - if(!dbc.Load(fn, fmt, customEntriesCount)) + if(!dbc.Load(fn, fmt)) return false; fieldCount = dbc.GetCols(); |