Missing part

This commit is contained in:
Aokromes committed 2017-04-18 17:33:37 +02:00
1 parent 9bd0fbb718
commit 7c16e39bd5
13 files changed
+27 -27

No files matched your search

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2011 TrintiyCore <http://www.trinitycore.org/>
* Copyright (C) 2008-2017 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
+2 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2011 TrintiyCore <http://www.trinitycore.org/>
* Copyright (C) 2007-2017 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -104,4 +104,4 @@ private:
int unk5; // WDB2
};
#endif
#endif
+6 -6
View File
@@ -33,7 +33,7 @@ public:
virtual bool HasRecord(uint32 id) const = 0;
virtual void WriteRecord(uint32 id, uint32 locale, ByteBuffer& buffer) const = 0;
virtual void WriteRecord(uint32 id, LocaleConstant localeConstant, ByteBuffer& buffer) const = 0;
protected:
uint32 tableHash;
@@ -103,7 +103,7 @@ class DB2Storage : public DB2StorageBase
typedef std::list<char*> StringPoolList;
typedef std::vector<T*> DataTableEx;
typedef bool(*EntryChecker)(DB2Storage<T> const&, uint32);
typedef void(*PacketWriter)(DB2Storage<T> const&, uint32, uint32, ByteBuffer&);
typedef void(*PacketWriter)(DB2Storage<T> const&, uint32, LocaleConstant, ByteBuffer&);
public:
DB2Storage(char const* f, EntryChecker checkEntry = NULL, PacketWriter writePacket = NULL) :
nCount(0), fieldCount(0), fmt(f), m_dataTable(NULL)
@@ -120,9 +120,9 @@ public:
uint32 GetNumRows() const { return nCount; }
char const* GetFormat() const { return fmt; }
uint32 GetFieldCount() const { return fieldCount; }
void WriteRecord(uint32 id, uint32 locale, ByteBuffer& buffer) const
void WriteRecord(uint32 id, LocaleConstant localeConstant, ByteBuffer& buffer) const
{
WritePacket(*this, id, locale, buffer);
WritePacket(*this, id, localeConstant, buffer);
}
T* CreateEntry(uint32 id, bool evenIfExists = false)
@@ -149,7 +149,7 @@ public:
void EraseEntry(uint32 id) { indexTable.asT[id] = NULL; }
bool Load(char const* fn, uint32 locale)
bool Load(char const* fn, LocaleConstant localeConstant)
{
DB2FileLoader db2;
// Check if load was sucessful, only then continue
@@ -166,7 +166,7 @@ public:
m_stringPoolList.push_back(db2.AutoProduceStringsArrayHolders(fmt, (char*)m_dataTable));
// load strings from dbc data
m_stringPoolList.push_back(db2.AutoProduceStrings(fmt, (char*)m_dataTable, locale));
m_stringPoolList.push_back(db2.AutoProduceStrings(fmt, (char*)m_dataTable, localeConstant));
// error in dbc file at loading if NULL
return indexTable.asT != NULL;