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

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

uint32_t FactionGroupRec::GetNumColumns() {
    return 20;
}

uint32_t FactionGroupRec::GetRowSize() {
    return 80;
}

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

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

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

bool FactionGroupRec::Read(SFile* f, const char* stringBuffer) {
    uint32_t internalNameOfs;
    uint32_t nameOfs[16];
    uint32_t nameMask;

    if (
        !SFile::Read(f, &this->m_ID, sizeof(this->m_ID), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_maskID, sizeof(this->m_maskID), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &internalNameOfs, 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)
    ) {
        return false;
    }

    if (stringBuffer) {
        this->m_internalName = &stringBuffer[internalNameOfs];
        this->m_name = &stringBuffer[nameOfs[CURRENT_LANGUAGE]];
    } else {
        this->m_internalName = "";
        this->m_name = "";
    }

    return true;
}
