// 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;
}
