mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-20 21:14:56 +03:00
feat(db): add CharBaseInfoRec
This commit is contained in:
4 files changed
+70
-3
No files matched your search
@@ -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;
|
||||
}
|
||||
@@ -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
|
||||
Reference in new issue
Block a user