mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-27 16:22:32 +03:00
feat(db): add CreatureModelDataRec
This commit is contained in:
4 files changed
+126
No files matched your search
@@ -0,0 +1,73 @@
|
||||
// DO NOT EDIT: generated by whoa-autocode
|
||||
#include "db/rec/CreatureModelDataRec.hpp"
|
||||
#include "util/Locale.hpp"
|
||||
#include "util/SFile.hpp"
|
||||
|
||||
const char* CreatureModelDataRec::GetFilename() {
|
||||
return "DBFilesClient\\CreatureModelData.dbc";
|
||||
}
|
||||
|
||||
uint32_t CreatureModelDataRec::GetNumColumns() {
|
||||
return 28;
|
||||
}
|
||||
|
||||
uint32_t CreatureModelDataRec::GetRowSize() {
|
||||
return 112;
|
||||
}
|
||||
|
||||
bool CreatureModelDataRec::NeedIDAssigned() {
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t CreatureModelDataRec::GetID() {
|
||||
return this->m_ID;
|
||||
}
|
||||
|
||||
void CreatureModelDataRec::SetID(int32_t id) {
|
||||
this->m_ID = id;
|
||||
}
|
||||
|
||||
bool CreatureModelDataRec::Read(SFile* f, const char* stringBuffer) {
|
||||
uint32_t modelNameOfs;
|
||||
|
||||
if (
|
||||
!SFile::Read(f, &this->m_ID, sizeof(this->m_ID), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_flags, sizeof(this->m_flags), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &modelNameOfs, sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_sizeClass, sizeof(this->m_sizeClass), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_modelScale, sizeof(this->m_modelScale), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_bloodID, sizeof(this->m_bloodID), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_footprintTextureID, sizeof(this->m_footprintTextureID), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_footprintTextureLength, sizeof(this->m_footprintTextureLength), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_footprintTextureWidth, sizeof(this->m_footprintTextureWidth), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_footprintParticleScale, sizeof(this->m_footprintParticleScale), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_foleyMaterialID, sizeof(this->m_foleyMaterialID), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_footstepShakeSize, sizeof(this->m_footstepShakeSize), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_deathThudShakeSize, sizeof(this->m_deathThudShakeSize), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_soundID, sizeof(this->m_soundID), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_collisionWidth, sizeof(this->m_collisionWidth), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_collisionHeight, sizeof(this->m_collisionHeight), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_mountHeight, sizeof(this->m_mountHeight), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_geoBoxMinX, sizeof(this->m_geoBoxMinX), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_geoBoxMinY, sizeof(this->m_geoBoxMinY), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_geoBoxMinZ, sizeof(this->m_geoBoxMinZ), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_geoBoxMaxX, sizeof(this->m_geoBoxMaxX), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_geoBoxMaxY, sizeof(this->m_geoBoxMaxY), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_geoBoxMaxZ, sizeof(this->m_geoBoxMaxZ), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_worldEffectScale, sizeof(this->m_worldEffectScale), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_attachedEffectScale, sizeof(this->m_attachedEffectScale), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_missileCollisionRadius, sizeof(this->m_missileCollisionRadius), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_missileCollisionPush, sizeof(this->m_missileCollisionPush), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_missileCollisionRaise, sizeof(this->m_missileCollisionRaise), nullptr, nullptr, nullptr)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (stringBuffer) {
|
||||
this->m_modelName = &stringBuffer[modelNameOfs];
|
||||
} else {
|
||||
this->m_modelName = "";
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
// DO NOT EDIT: generated by whoa-autocode
|
||||
#ifndef DB_REC_CREATURE_MODEL_DATA_REC_HPP
|
||||
#define DB_REC_CREATURE_MODEL_DATA_REC_HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
class SFile;
|
||||
|
||||
class CreatureModelDataRec {
|
||||
public:
|
||||
int32_t m_ID;
|
||||
int32_t m_flags;
|
||||
const char* m_modelName;
|
||||
int32_t m_sizeClass;
|
||||
float m_modelScale;
|
||||
int32_t m_bloodID;
|
||||
int32_t m_footprintTextureID;
|
||||
float m_footprintTextureLength;
|
||||
float m_footprintTextureWidth;
|
||||
float m_footprintParticleScale;
|
||||
int32_t m_foleyMaterialID;
|
||||
int32_t m_footstepShakeSize;
|
||||
int32_t m_deathThudShakeSize;
|
||||
int32_t m_soundID;
|
||||
float m_collisionWidth;
|
||||
float m_collisionHeight;
|
||||
float m_mountHeight;
|
||||
float m_geoBoxMinX;
|
||||
float m_geoBoxMinY;
|
||||
float m_geoBoxMinZ;
|
||||
float m_geoBoxMaxX;
|
||||
float m_geoBoxMaxY;
|
||||
float m_geoBoxMaxZ;
|
||||
float m_worldEffectScale;
|
||||
float m_attachedEffectScale;
|
||||
float m_missileCollisionRadius;
|
||||
float m_missileCollisionPush;
|
||||
float m_missileCollisionRaise;
|
||||
|
||||
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