mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-27 08:13:50 +03:00
feat(db): add CreatureDisplayInfoRec
This commit is contained in:
4 files changed
+107
No files matched your search
@@ -0,0 +1,68 @@
|
||||
// DO NOT EDIT: generated by whoa-autocode
|
||||
#include "db/rec/CreatureDisplayInfoRec.hpp"
|
||||
#include "util/Locale.hpp"
|
||||
#include "util/SFile.hpp"
|
||||
|
||||
const char* CreatureDisplayInfoRec::GetFilename() {
|
||||
return "DBFilesClient\\CreatureDisplayInfo.dbc";
|
||||
}
|
||||
|
||||
uint32_t CreatureDisplayInfoRec::GetNumColumns() {
|
||||
return 16;
|
||||
}
|
||||
|
||||
uint32_t CreatureDisplayInfoRec::GetRowSize() {
|
||||
return 64;
|
||||
}
|
||||
|
||||
bool CreatureDisplayInfoRec::NeedIDAssigned() {
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t CreatureDisplayInfoRec::GetID() {
|
||||
return this->m_ID;
|
||||
}
|
||||
|
||||
void CreatureDisplayInfoRec::SetID(int32_t id) {
|
||||
this->m_ID = id;
|
||||
}
|
||||
|
||||
bool CreatureDisplayInfoRec::Read(SFile* f, const char* stringBuffer) {
|
||||
uint32_t textureVariationOfs[3];
|
||||
uint32_t portraitTextureNameOfs;
|
||||
|
||||
if (
|
||||
!SFile::Read(f, &this->m_ID, sizeof(this->m_ID), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_modelID, sizeof(this->m_modelID), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_soundID, sizeof(this->m_soundID), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_extendedDisplayInfoID, sizeof(this->m_extendedDisplayInfoID), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_creatureModelScale, sizeof(this->m_creatureModelScale), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_creatureModelAlpha, sizeof(this->m_creatureModelAlpha), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &textureVariationOfs[0], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &textureVariationOfs[1], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &textureVariationOfs[2], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &portraitTextureNameOfs, sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_sizeClass, sizeof(this->m_sizeClass), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_bloodID, sizeof(this->m_bloodID), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_npcsoundID, sizeof(this->m_npcsoundID), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_particleColorID, sizeof(this->m_particleColorID), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_creatureGeosetData, sizeof(this->m_creatureGeosetData), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_objectEffectPackageID, sizeof(this->m_objectEffectPackageID), nullptr, nullptr, nullptr)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (stringBuffer) {
|
||||
this->m_textureVariation[0] = &stringBuffer[textureVariationOfs[0]];
|
||||
this->m_textureVariation[1] = &stringBuffer[textureVariationOfs[1]];
|
||||
this->m_textureVariation[2] = &stringBuffer[textureVariationOfs[2]];
|
||||
this->m_portraitTextureName = &stringBuffer[portraitTextureNameOfs];
|
||||
} else {
|
||||
this->m_textureVariation[0] = "";
|
||||
this->m_textureVariation[1] = "";
|
||||
this->m_textureVariation[2] = "";
|
||||
this->m_portraitTextureName = "";
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
// DO NOT EDIT: generated by whoa-autocode
|
||||
#ifndef DB_REC_CREATURE_DISPLAY_INFO_REC_HPP
|
||||
#define DB_REC_CREATURE_DISPLAY_INFO_REC_HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
class SFile;
|
||||
|
||||
class CreatureDisplayInfoRec {
|
||||
public:
|
||||
int32_t m_ID;
|
||||
int32_t m_modelID;
|
||||
int32_t m_soundID;
|
||||
int32_t m_extendedDisplayInfoID;
|
||||
float m_creatureModelScale;
|
||||
int32_t m_creatureModelAlpha;
|
||||
const char* m_textureVariation[3];
|
||||
const char* m_portraitTextureName;
|
||||
int32_t m_sizeClass;
|
||||
int32_t m_bloodID;
|
||||
int32_t m_npcsoundID;
|
||||
int32_t m_particleColorID;
|
||||
int32_t m_creatureGeosetData;
|
||||
int32_t m_objectEffectPackageID;
|
||||
|
||||
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