feat(Core/DBC): rework load DBC (#3002)

* Move DBC load system from TC
* Add db tables for all dbc
* Support override data from db
* Support override spells from db (#2994)
This commit is contained in:
Kargatum
2020-07-22 13:43:16 +07:00
committed by GitHub
parent 3cce44469a
commit 833611f1c5
19 changed files with 13497 additions and 843 deletions

View File

@@ -0,0 +1,32 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-GPL2
* Copyright (C) 2008-2020 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#ifndef DBCDatabaseLoader_h__
#define DBCDatabaseLoader_h__
#include "DBCFileLoader.h"
#include <string>
#include <vector>
struct DBCDatabaseLoader
{
DBCDatabaseLoader(char const* dbTable, char const* dbcFormatString, std::vector<char*>& stringPool);
char* Load(uint32& records, char**& indexTable);
private:
char const* _sqlTableName;
char const* _dbcFormat;
int32 _sqlIndexPos;
uint32 _recordSize;
std::vector<char*>& _stringPool;
char* CloneStringToPool(std::string const& str);
DBCDatabaseLoader(DBCDatabaseLoader const& right) = delete;
DBCDatabaseLoader& operator=(DBCDatabaseLoader const& right) = delete;
};
#endif // DBCDatabaseLoader_h__