From 090cd1dc54718521aa22eb5040a6ea052f98a231 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Sat, 25 Oct 2025 22:43:05 -0500 Subject: [PATCH] feat(db): generate id fields if needed during record loads --- src/db/WowClientDB.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/db/WowClientDB.hpp b/src/db/WowClientDB.hpp index 51495c4..6553c52 100644 --- a/src/db/WowClientDB.hpp +++ b/src/db/WowClientDB.hpp @@ -159,6 +159,10 @@ void WowClientDB::LoadRecords(SFile* f, const char* filename, int32_t linenum auto record = &this->m_records[i]; record->Read(f, this->m_strings); + if (T::NeedIDAssigned()) { + record->SetID(i); + } + this->m_maxID = record->GetID() > this->m_maxID ? record->GetID() : this->m_maxID; this->m_minID = record->GetID() < this->m_minID ? record->GetID() : this->m_minID; }