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

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

uint32_t PaperDollItemFrameRec::GetNumColumns() {
    return 3;
}

uint32_t PaperDollItemFrameRec::GetRowSize() {
    return 12;
}

bool PaperDollItemFrameRec::NeedIDAssigned() {
    return true;
}

int32_t PaperDollItemFrameRec::GetID() {
    return this->m_generatedID;
}

void PaperDollItemFrameRec::SetID(int32_t id) {
    this->m_generatedID = id;
}

bool PaperDollItemFrameRec::Read(SFile* f, const char* stringBuffer) {
    uint32_t itemButtonNameOfs;
    uint32_t slotIconOfs;

    if (
        !SFile::Read(f, &itemButtonNameOfs, sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &slotIconOfs, sizeof(uint32_t), nullptr, nullptr, nullptr)
        || !SFile::Read(f, &this->m_slotNumber, sizeof(this->m_slotNumber), nullptr, nullptr, nullptr)
    ) {
        return false;
    }

    if (stringBuffer) {
        this->m_itemButtonName = &stringBuffer[itemButtonNameOfs];
        this->m_slotIcon = &stringBuffer[slotIconOfs];
    } else {
        this->m_itemButtonName = "";
        this->m_slotIcon = "";
    }

    return true;
}
