whoa/src/db/rec/ItemDisplayInfoRec.cpp
2025-10-28 20:50:48 -05:00

100 lines
4.5 KiB
C++

// DO NOT EDIT: generated by whoa-autocode
#include "db/rec/ItemDisplayInfoRec.hpp"
#include "util/Locale.hpp"
#include "util/SFile.hpp"
const char* ItemDisplayInfoRec::GetFilename() {
return "DBFilesClient\\ItemDisplayInfo.dbc";
}
uint32_t ItemDisplayInfoRec::GetNumColumns() {
return 25;
}
uint32_t ItemDisplayInfoRec::GetRowSize() {
return 100;
}
bool ItemDisplayInfoRec::NeedIDAssigned() {
return false;
}
int32_t ItemDisplayInfoRec::GetID() {
return this->m_ID;
}
void ItemDisplayInfoRec::SetID(int32_t id) {
this->m_ID = id;
}
bool ItemDisplayInfoRec::Read(SFile* f, const char* stringBuffer) {
uint32_t modelNameOfs[2];
uint32_t modelTextureOfs[2];
uint32_t inventoryIconOfs[2];
uint32_t textureOfs[8];
if (
!SFile::Read(f, &this->m_ID, sizeof(this->m_ID), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &modelNameOfs[0], sizeof(uint32_t), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &modelNameOfs[1], sizeof(uint32_t), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &modelTextureOfs[0], sizeof(uint32_t), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &modelTextureOfs[1], sizeof(uint32_t), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &inventoryIconOfs[0], sizeof(uint32_t), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &inventoryIconOfs[1], sizeof(uint32_t), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &this->m_geosetGroup[0], sizeof(m_geosetGroup[0]), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &this->m_geosetGroup[1], sizeof(m_geosetGroup[0]), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &this->m_geosetGroup[2], sizeof(m_geosetGroup[0]), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &this->m_flags, sizeof(this->m_flags), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &this->m_spellVisualID, sizeof(this->m_spellVisualID), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &this->m_groupSoundIndex, sizeof(this->m_groupSoundIndex), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &this->m_helmetGeosetVisID[0], sizeof(m_helmetGeosetVisID[0]), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &this->m_helmetGeosetVisID[1], sizeof(m_helmetGeosetVisID[0]), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &textureOfs[0], sizeof(uint32_t), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &textureOfs[1], sizeof(uint32_t), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &textureOfs[2], sizeof(uint32_t), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &textureOfs[3], sizeof(uint32_t), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &textureOfs[4], sizeof(uint32_t), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &textureOfs[5], sizeof(uint32_t), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &textureOfs[6], sizeof(uint32_t), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &textureOfs[7], sizeof(uint32_t), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &this->m_itemVisual, sizeof(this->m_itemVisual), nullptr, nullptr, nullptr)
|| !SFile::Read(f, &this->m_particleColorID, sizeof(this->m_particleColorID), nullptr, nullptr, nullptr)
) {
return false;
}
if (stringBuffer) {
this->m_modelName[0] = &stringBuffer[modelNameOfs[0]];
this->m_modelName[1] = &stringBuffer[modelNameOfs[1]];
this->m_modelTexture[0] = &stringBuffer[modelTextureOfs[0]];
this->m_modelTexture[1] = &stringBuffer[modelTextureOfs[1]];
this->m_inventoryIcon[0] = &stringBuffer[inventoryIconOfs[0]];
this->m_inventoryIcon[1] = &stringBuffer[inventoryIconOfs[1]];
this->m_texture[0] = &stringBuffer[textureOfs[0]];
this->m_texture[1] = &stringBuffer[textureOfs[1]];
this->m_texture[2] = &stringBuffer[textureOfs[2]];
this->m_texture[3] = &stringBuffer[textureOfs[3]];
this->m_texture[4] = &stringBuffer[textureOfs[4]];
this->m_texture[5] = &stringBuffer[textureOfs[5]];
this->m_texture[6] = &stringBuffer[textureOfs[6]];
this->m_texture[7] = &stringBuffer[textureOfs[7]];
} else {
this->m_modelName[0] = "";
this->m_modelName[1] = "";
this->m_modelTexture[0] = "";
this->m_modelTexture[1] = "";
this->m_inventoryIcon[0] = "";
this->m_inventoryIcon[1] = "";
this->m_texture[0] = "";
this->m_texture[1] = "";
this->m_texture[2] = "";
this->m_texture[3] = "";
this->m_texture[4] = "";
this->m_texture[5] = "";
this->m_texture[6] = "";
this->m_texture[7] = "";
}
return true;
}