// DO NOT EDIT: generated by whoa-autocode
#include "db/rec/CreatureDisplayInfoExtraRec.hpp"
#include "util/Locale.hpp"
#include "util/SFile.hpp"

const char* CreatureDisplayInfoExtraRec::GetFilename() {
    return "DBFilesClient\\CreatureDisplayInfoExtra.dbc";
}

uint32_t CreatureDisplayInfoExtraRec::GetNumColumns() {
    return 21;
}

uint32_t CreatureDisplayInfoExtraRec::GetRowSize() {
    return 84;
}

bool CreatureDisplayInfoExtraRec::NeedIDAssigned() {
    return false;
}

int32_t CreatureDisplayInfoExtraRec::GetID() {
    return this->m_ID;
}

void CreatureDisplayInfoExtraRec::SetID(int32_t id) {
    this->m_ID = id;
}

bool CreatureDisplayInfoExtraRec::Read(SFile* f, const char* stringBuffer) {
    uint32_t bakeNameOfs;

    if (
        !SFile::Read(f, &this->m_ID, sizeof(this->m_ID), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_displayRaceID, sizeof(this->m_displayRaceID), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_displaySexID, sizeof(this->m_displaySexID), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_skinID, sizeof(this->m_skinID), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_faceID, sizeof(this->m_faceID), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_hairStyleID, sizeof(this->m_hairStyleID), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_hairColorID, sizeof(this->m_hairColorID), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_facialHairID, sizeof(this->m_facialHairID), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_npcitemDisplay[0], sizeof(m_npcitemDisplay[0]), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_npcitemDisplay[1], sizeof(m_npcitemDisplay[0]), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_npcitemDisplay[2], sizeof(m_npcitemDisplay[0]), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_npcitemDisplay[3], sizeof(m_npcitemDisplay[0]), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_npcitemDisplay[4], sizeof(m_npcitemDisplay[0]), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_npcitemDisplay[5], sizeof(m_npcitemDisplay[0]), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_npcitemDisplay[6], sizeof(m_npcitemDisplay[0]), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_npcitemDisplay[7], sizeof(m_npcitemDisplay[0]), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_npcitemDisplay[8], sizeof(m_npcitemDisplay[0]), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_npcitemDisplay[9], sizeof(m_npcitemDisplay[0]), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_npcitemDisplay[10], sizeof(m_npcitemDisplay[0]), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_flags, sizeof(this->m_flags), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &bakeNameOfs, sizeof(uint32_t), nullptr, nullptr, nullptr)
    ) {
        return false;
    }

    if (stringBuffer) {
        this->m_bakeName = &stringBuffer[bakeNameOfs];
    } else {
        this->m_bakeName = "";
    }

    return true;
}
