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

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

uint32_t ChrClassesRec::GetNumColumns() {
    return 60;
}

uint32_t ChrClassesRec::GetRowSize() {
    return 240;
}

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

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

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

bool ChrClassesRec::Read(SFile* f, const char* stringBuffer) {
    uint32_t petNameTokenOfs;
    uint32_t nameOfs[16];
    uint32_t nameMask;
    uint32_t nameFemaleOfs[16];
    uint32_t nameFemaleMask;
    uint32_t nameMaleOfs[16];
    uint32_t nameMaleMask;
    uint32_t filenameOfs;

    if (
        !SFile::Read(f, &this->m_ID, sizeof(this->m_ID), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_damageBonusStat, sizeof(this->m_damageBonusStat), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_displayPower, sizeof(this->m_displayPower), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &petNameTokenOfs, sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameOfs[0], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameOfs[1], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameOfs[2], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameOfs[3], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameOfs[4], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameOfs[5], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameOfs[6], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameOfs[7], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameOfs[8], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameOfs[9], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameOfs[10], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameOfs[11], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameOfs[12], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameOfs[13], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameOfs[14], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameOfs[15], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameMask, sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameFemaleOfs[0], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameFemaleOfs[1], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameFemaleOfs[2], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameFemaleOfs[3], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameFemaleOfs[4], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameFemaleOfs[5], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameFemaleOfs[6], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameFemaleOfs[7], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameFemaleOfs[8], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameFemaleOfs[9], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameFemaleOfs[10], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameFemaleOfs[11], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameFemaleOfs[12], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameFemaleOfs[13], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameFemaleOfs[14], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameFemaleOfs[15], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameFemaleMask, sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameMaleOfs[0], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameMaleOfs[1], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameMaleOfs[2], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameMaleOfs[3], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameMaleOfs[4], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameMaleOfs[5], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameMaleOfs[6], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameMaleOfs[7], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameMaleOfs[8], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameMaleOfs[9], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameMaleOfs[10], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameMaleOfs[11], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameMaleOfs[12], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameMaleOfs[13], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameMaleOfs[14], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameMaleOfs[15], sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &nameMaleMask, sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &filenameOfs, sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_spellClassSet, sizeof(this->m_spellClassSet), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_flags, sizeof(this->m_flags), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_cinematicSequenceID, sizeof(this->m_cinematicSequenceID), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_requiredExpansion, sizeof(this->m_requiredExpansion), nullptr, nullptr, nullptr)
    ) {
        return false;
    }

    if (stringBuffer) {
        this->m_petNameToken = &stringBuffer[petNameTokenOfs];
        this->m_name = &stringBuffer[nameOfs[CURRENT_LANGUAGE]];
        this->m_nameFemale = &stringBuffer[nameFemaleOfs[CURRENT_LANGUAGE]];
        this->m_nameMale = &stringBuffer[nameMaleOfs[CURRENT_LANGUAGE]];
        this->m_filename = &stringBuffer[filenameOfs];
    } else {
        this->m_petNameToken = "";
        this->m_name = "";
        this->m_nameFemale = "";
        this->m_nameMale = "";
        this->m_filename = "";
    }

    return true;
}
