mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 13:41:06 +03:00
feat(db): add UnitBloodLevelsRec
This commit is contained in:
parent
c6a89b5ef8
commit
e56bde0dde
@ -23,6 +23,7 @@ WowClientDB<MapRec> g_mapDB;
|
||||
WowClientDB<PaperDollItemFrameRec> g_paperDollItemFrameDB;
|
||||
WowClientDB<SoundEntriesRec> g_soundEntriesDB;
|
||||
WowClientDB<SoundEntriesAdvancedRec> g_soundEntriesAdvancedDB;
|
||||
WowClientDB<UnitBloodLevelsRec> g_unitBloodLevelsDB;
|
||||
|
||||
void LoadDB(WowClientDB_Base* db, const char* filename, int32_t linenumber) {
|
||||
db->Load(filename, linenumber);
|
||||
@ -51,6 +52,7 @@ void StaticDBLoadAll(void (*loadFn)(WowClientDB_Base*, const char*, int32_t)) {
|
||||
loadFn(&g_paperDollItemFrameDB, __FILE__, __LINE__);
|
||||
loadFn(&g_soundEntriesDB, __FILE__, __LINE__);
|
||||
loadFn(&g_soundEntriesAdvancedDB, __FILE__, __LINE__);
|
||||
loadFn(&g_unitBloodLevelsDB, __FILE__, __LINE__);
|
||||
};
|
||||
|
||||
void ClientDBInitialize() {
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
#include "db/rec/PaperDollItemFrameRec.hpp"
|
||||
#include "db/rec/SoundEntriesRec.hpp"
|
||||
#include "db/rec/SoundEntriesAdvancedRec.hpp"
|
||||
#include "db/rec/UnitBloodLevelsRec.hpp"
|
||||
|
||||
extern WowClientDB<AchievementRec> g_achievementDB;
|
||||
extern WowClientDB<AreaTableRec> g_areaTableDB;
|
||||
@ -47,6 +48,7 @@ extern WowClientDB<MapRec> g_mapDB;
|
||||
extern WowClientDB<PaperDollItemFrameRec> g_paperDollItemFrameDB;
|
||||
extern WowClientDB<SoundEntriesRec> g_soundEntriesDB;
|
||||
extern WowClientDB<SoundEntriesAdvancedRec> g_soundEntriesAdvancedDB;
|
||||
extern WowClientDB<UnitBloodLevelsRec> g_unitBloodLevelsDB;
|
||||
|
||||
void ClientDBInitialize();
|
||||
|
||||
|
||||
41
src/db/rec/UnitBloodLevelsRec.cpp
Normal file
41
src/db/rec/UnitBloodLevelsRec.cpp
Normal file
@ -0,0 +1,41 @@
|
||||
// DO NOT EDIT: generated by whoa-autocode
|
||||
#include "db/rec/UnitBloodLevelsRec.hpp"
|
||||
#include "util/Locale.hpp"
|
||||
#include "util/SFile.hpp"
|
||||
|
||||
const char* UnitBloodLevelsRec::GetFilename() {
|
||||
return "DBFilesClient\\UnitBloodLevels.dbc";
|
||||
}
|
||||
|
||||
uint32_t UnitBloodLevelsRec::GetNumColumns() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
uint32_t UnitBloodLevelsRec::GetRowSize() {
|
||||
return 16;
|
||||
}
|
||||
|
||||
bool UnitBloodLevelsRec::NeedIDAssigned() {
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t UnitBloodLevelsRec::GetID() {
|
||||
return this->m_ID;
|
||||
}
|
||||
|
||||
void UnitBloodLevelsRec::SetID(int32_t id) {
|
||||
this->m_ID = id;
|
||||
}
|
||||
|
||||
bool UnitBloodLevelsRec::Read(SFile* f, const char* stringBuffer) {
|
||||
if (
|
||||
!SFile::Read(f, &this->m_ID, sizeof(this->m_ID), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_violencelevel[0], sizeof(m_violencelevel[0]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_violencelevel[1], sizeof(m_violencelevel[0]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_violencelevel[2], sizeof(m_violencelevel[0]), nullptr, nullptr, nullptr)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
23
src/db/rec/UnitBloodLevelsRec.hpp
Normal file
23
src/db/rec/UnitBloodLevelsRec.hpp
Normal file
@ -0,0 +1,23 @@
|
||||
// DO NOT EDIT: generated by whoa-autocode
|
||||
#ifndef DB_REC_UNIT_BLOOD_LEVELS_REC_HPP
|
||||
#define DB_REC_UNIT_BLOOD_LEVELS_REC_HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
class SFile;
|
||||
|
||||
class UnitBloodLevelsRec {
|
||||
public:
|
||||
int32_t m_ID;
|
||||
int32_t m_violencelevel[3];
|
||||
|
||||
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