mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(db): add CharBaseInfoRec
This commit is contained in:
parent
114eca74bb
commit
94fcfef5c0
@ -5,9 +5,10 @@ WowClientDB<AchievementRec> g_achievementDB;
|
||||
WowClientDB<AreaTableRec> g_areaTableDB;
|
||||
WowClientDB<Cfg_CategoriesRec> g_cfg_CategoriesDB;
|
||||
WowClientDB<Cfg_ConfigsRec> g_cfg_ConfigsDB;
|
||||
WowClientDB<CharacterFacialHairStylesRec> g_characterFacialHairStylesDB;
|
||||
WowClientDB<CharBaseInfoRec> g_charBaseInfoDB;
|
||||
WowClientDB<CharHairGeosetsRec> g_charHairGeosetsDB;
|
||||
WowClientDB<CharSectionsRec> g_charSectionsDB;
|
||||
WowClientDB<CharacterFacialHairStylesRec> g_characterFacialHairStylesDB;
|
||||
WowClientDB<ChrClassesRec> g_chrClassesDB;
|
||||
WowClientDB<ChrRacesRec> g_chrRacesDB;
|
||||
WowClientDB<CreatureDisplayInfoRec> g_creatureDisplayInfoDB;
|
||||
@ -27,9 +28,10 @@ void StaticDBLoadAll(void (*loadFn)(WowClientDB_Base*, const char*, int32_t)) {
|
||||
loadFn(&g_areaTableDB, __FILE__, __LINE__);
|
||||
loadFn(&g_cfg_CategoriesDB, __FILE__, __LINE__);
|
||||
loadFn(&g_cfg_ConfigsDB, __FILE__, __LINE__);
|
||||
loadFn(&g_characterFacialHairStylesDB, __FILE__, __LINE__);
|
||||
loadFn(&g_charBaseInfoDB, __FILE__, __LINE__);
|
||||
loadFn(&g_charHairGeosetsDB, __FILE__, __LINE__);
|
||||
loadFn(&g_charSectionsDB, __FILE__, __LINE__);
|
||||
loadFn(&g_characterFacialHairStylesDB, __FILE__, __LINE__);
|
||||
loadFn(&g_chrClassesDB, __FILE__, __LINE__);
|
||||
loadFn(&g_chrRacesDB, __FILE__, __LINE__);
|
||||
loadFn(&g_creatureDisplayInfoDB, __FILE__, __LINE__);
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
#include "db/rec/AreaTableRec.hpp"
|
||||
#include "db/rec/Cfg_CategoriesRec.hpp"
|
||||
#include "db/rec/Cfg_ConfigsRec.hpp"
|
||||
#include "db/rec/CharBaseInfoRec.hpp"
|
||||
#include "db/rec/CharHairGeosetsRec.hpp"
|
||||
#include "db/rec/CharSectionsRec.hpp"
|
||||
#include "db/rec/CharacterFacialHairStylesRec.hpp"
|
||||
@ -23,9 +24,10 @@ extern WowClientDB<AchievementRec> g_achievementDB;
|
||||
extern WowClientDB<AreaTableRec> g_areaTableDB;
|
||||
extern WowClientDB<Cfg_CategoriesRec> g_cfg_CategoriesDB;
|
||||
extern WowClientDB<Cfg_ConfigsRec> g_cfg_ConfigsDB;
|
||||
extern WowClientDB<CharacterFacialHairStylesRec> g_characterFacialHairStylesDB;
|
||||
extern WowClientDB<CharBaseInfoRec> g_charBaseInfoDB;
|
||||
extern WowClientDB<CharHairGeosetsRec> g_charHairGeosetsDB;
|
||||
extern WowClientDB<CharSectionsRec> g_charSectionsDB;
|
||||
extern WowClientDB<CharacterFacialHairStylesRec> g_characterFacialHairStylesDB;
|
||||
extern WowClientDB<ChrClassesRec> g_chrClassesDB;
|
||||
extern WowClientDB<ChrRacesRec> g_chrRacesDB;
|
||||
extern WowClientDB<CreatureDisplayInfoRec> g_creatureDisplayInfoDB;
|
||||
|
||||
39
src/db/rec/CharBaseInfoRec.cpp
Normal file
39
src/db/rec/CharBaseInfoRec.cpp
Normal file
@ -0,0 +1,39 @@
|
||||
// DO NOT EDIT: generated by whoa-autocode
|
||||
#include "db/rec/CharBaseInfoRec.hpp"
|
||||
#include "util/Locale.hpp"
|
||||
#include "util/SFile.hpp"
|
||||
|
||||
const char* CharBaseInfoRec::GetFilename() {
|
||||
return "DBFilesClient\\CharBaseInfo.dbc";
|
||||
}
|
||||
|
||||
uint32_t CharBaseInfoRec::GetNumColumns() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
uint32_t CharBaseInfoRec::GetRowSize() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
bool CharBaseInfoRec::NeedIDAssigned() {
|
||||
return true;
|
||||
}
|
||||
|
||||
int32_t CharBaseInfoRec::GetID() {
|
||||
return this->m_generatedID;
|
||||
}
|
||||
|
||||
void CharBaseInfoRec::SetID(int32_t id) {
|
||||
this->m_generatedID = id;
|
||||
}
|
||||
|
||||
bool CharBaseInfoRec::Read(SFile* f, const char* stringBuffer) {
|
||||
if (
|
||||
!SFile::Read(f, &this->m_raceID, sizeof(this->m_raceID), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_classID, sizeof(this->m_classID), nullptr, nullptr, nullptr)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
24
src/db/rec/CharBaseInfoRec.hpp
Normal file
24
src/db/rec/CharBaseInfoRec.hpp
Normal file
@ -0,0 +1,24 @@
|
||||
// DO NOT EDIT: generated by whoa-autocode
|
||||
#ifndef DB_REC_CHAR_BASE_INFO_REC_HPP
|
||||
#define DB_REC_CHAR_BASE_INFO_REC_HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
class SFile;
|
||||
|
||||
class CharBaseInfoRec {
|
||||
public:
|
||||
int8_t m_raceID;
|
||||
int8_t m_classID;
|
||||
int32_t m_generatedID;
|
||||
|
||||
static const char* GetFilename();
|
||||
static uint32_t GetNumColumns();
|
||||
static uint32_t GetRowSize();
|
||||
static bool NeedIDAssigned();
|
||||
int32_t GetID();
|
||||
void SetID(int32_t id);
|
||||
bool Read(SFile* f, const char* stringBuffer);
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Reference in New Issue
Block a user