Files
wowdecomp/WoW/Source/DB/Rec/UnitBloodRec.cpp
T
SatyandClaude Opus 5.5 20885b056c DB: WowClientDB<T>/WowClientDB_RLE<T>, per-record .cpp, table globals, StaticDBLoadAll, ClientDBInitialize
- WowClientDB.h: WowClientDB_Base, IDatabase<T>, WowClientDB_Common<T> (Load),
  WowClientDB<T> and WowClientDB_RLE<T> (Spell, ItemDisplayInfo, Light*Band) with
  OFFSET lists for every 12340 instance; WowClientDB.cpp: base dtor, RLE row codec.
- Records are classes (0.5.3 decorations) with out-of-line ctor/dtor/GetFilename/Read
  in DB/Rec/*.cpp, static s_numColumns/s_rowSize/s_generatedID; ID field m_id.
- DBClient.cpp: 239 table globals, StaticDBLoadAll, ClientDBInitialize (6 callees
  declared, tracked); Startup_Strings in Client.cpp, VideoHardware in Hardware.cpp.
- IDB synced (410 names, snapshot Wow.exe.pre_clientdb_20260926.idb).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 17:18:11 +02:00

57 lines
2.3 KiB
C++

#include "WoW/Source/DB/Rec/UnitBloodRec.h"
#include "Engine/Source/BlizzardCore/SFile2-Core.h"
UnitBloodRec::UnitBloodRec() {
}
UnitBloodRec::~UnitBloodRec() {
}
// VERIFY: e716cdfe auto
// OFFSET: 0x008BA7A0
const char* UnitBloodRec::GetFilename() {
return "DBFilesClient\\UnitBlood.dbc";
}
// VERIFY: 7d8a1069 manual
// OFFSET: 0x008BA7B0
bool UnitBloodRec::Read(SFileImpl* file, const char* stringBuffer) {
uint32_t groundBloodOffset[5];
int32_t idRead = SFileReadFile(file, &this->m_id, sizeof(this->m_id), nullptr, nullptr, 0);
int32_t combatBloodSpurtFrontRead = SFileReadFile(file, this->m_combatBloodSpurtFront, sizeof(this->m_combatBloodSpurtFront), nullptr, nullptr, 0);
int32_t combatBloodSpurtBackRead = SFileReadFile(file, this->m_combatBloodSpurtBack, sizeof(this->m_combatBloodSpurtBack), nullptr, nullptr, 0);
int32_t groundBloodRead0 = SFileReadFile(file, &groundBloodOffset[0], sizeof(groundBloodOffset[0]), nullptr, nullptr, 0);
int32_t groundBloodRead1 = SFileReadFile(file, &groundBloodOffset[1], sizeof(groundBloodOffset[1]), nullptr, nullptr, 0);
int32_t groundBloodRead2 = SFileReadFile(file, &groundBloodOffset[2], sizeof(groundBloodOffset[2]), nullptr, nullptr, 0);
int32_t groundBloodRead3 = SFileReadFile(file, &groundBloodOffset[3], sizeof(groundBloodOffset[3]), nullptr, nullptr, 0);
int32_t groundBloodRead4 = SFileReadFile(file, &groundBloodOffset[4], sizeof(groundBloodOffset[4]), nullptr, nullptr, 0);
if (!idRead
| !combatBloodSpurtFrontRead
| !combatBloodSpurtBackRead
| !groundBloodRead0
| !groundBloodRead1
| !groundBloodRead2
| !groundBloodRead3
| !groundBloodRead4) {
return false;
}
if (stringBuffer) {
this->m_groundBlood[0] = &stringBuffer[groundBloodOffset[0]];
this->m_groundBlood[1] = &stringBuffer[groundBloodOffset[1]];
this->m_groundBlood[2] = &stringBuffer[groundBloodOffset[2]];
this->m_groundBlood[3] = &stringBuffer[groundBloodOffset[3]];
this->m_groundBlood[4] = &stringBuffer[groundBloodOffset[4]];
} else {
this->m_groundBlood[0] = "";
this->m_groundBlood[1] = "";
this->m_groundBlood[2] = "";
this->m_groundBlood[3] = "";
this->m_groundBlood[4] = "";
}
return true;
}