aboutsummaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorQAston <none@none>2009-08-18 18:47:20 +0200
committerQAston <none@none>2009-08-18 18:47:20 +0200
commitea986991874369f4b244676001f39767efdf4f32 (patch)
tree0aa455d75c6fca9f9d1305cbe2e07f5b82fcdd9e /src/shared
parent84bb5022f5bec20c34940a09ba25054625130afb (diff)
*Fix a typo in xp bonus auras.
--HG-- branch : trunk
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/Database/DBCFileLoader.cpp4
-rw-r--r--src/shared/Database/DBCFileLoader.h2
-rw-r--r--src/shared/Database/DBCStore.h4
3 files changed, 6 insertions, 4 deletions
diff --git a/src/shared/Database/DBCFileLoader.cpp b/src/shared/Database/DBCFileLoader.cpp
index 23f602f5c93..dc968fbce3b 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)
+bool DBCFileLoader::Load(const char *filename, const char *fmt, uint32 customEntriesCount)
{
uint32 header;
@@ -55,6 +55,8 @@ bool DBCFileLoader::Load(const char *filename, const char *fmt)
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 13562148dfc..ebdfef4523c 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);
+ bool Load(const char *filename, const char *fmt, uint32 customEntriesCount = 0);
class Record
{
diff --git a/src/shared/Database/DBCStore.h b/src/shared/Database/DBCStore.h
index 523d5c5a0b3..2906a93edbc 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)
+ bool Load(char const* fn, uint32 customEntriesCount = 0)
{
DBCFileLoader dbc;
// Check if load was sucessful, only then continue
- if(!dbc.Load(fn, fmt))
+ if(!dbc.Load(fn, fmt, customEntriesCount))
return false;
fieldCount = dbc.GetCols();