- Port hit-order Lua stand-ins (unit tokens, tooltips, combat log filters and current entry, bags/containers, quest POI, minimap, titles, world states, trade, group roles, runes, mirror timers, saved-variable registration, Quit) - LoadAddOn: real add-on loading (Blizzard_CombatLog etc. now load) - CombatLogEntry::PushEvent: COMBAT_LOG_EVENT arguments - World map chain: SetMapToCurrentZone, SetMap, GetWorldPosition, landmarks, overlays, highlight, zones, dungeon levels, player position - OpenArchives: locale index was off by one (enUS read the koKR DBC slot, leaving zone/map names empty) - Zone/area sound chain, invisible units (spline mode read size), raid/bag crash fixes, stand-in console, waystone icon for all executables - Coding-rule cleanups: statics/includes at the top, event enums, Lua _Scripts layout Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
59 lines
1.5 KiB
C++
59 lines
1.5 KiB
C++
#include "PetNameCache.h"
|
|
#include "Engine/Source/Base/CDataStore.h"
|
|
#include "Engine/Source/Storm/H/storm.h"
|
|
|
|
// INLINED
|
|
PetNameCache::PetNameCache() {
|
|
this->m_petNumber = 0;
|
|
this->m_name[0] = '\0';
|
|
this->m_declinedNames = nullptr;
|
|
this->m_timestamp = 0;
|
|
}
|
|
|
|
// INLINED
|
|
PetNameCache::~PetNameCache() {
|
|
delete this->m_declinedNames;
|
|
}
|
|
|
|
// VERIFY: b3d5f8cd auto
|
|
// OFFSET: 0x007F7550
|
|
void PetNameCache::Pack(CDataStore* msg) {
|
|
msg->Put(this->m_petNumber);
|
|
msg->PutString(this->m_name);
|
|
|
|
if (this->m_declinedNames) {
|
|
msg->Put(static_cast<uint8_t>(1));
|
|
|
|
for (uint32_t i = 0; i < 5; i++) {
|
|
msg->PutString(this->m_declinedNames->m_names[i]);
|
|
}
|
|
} else {
|
|
msg->Put(static_cast<uint8_t>(0));
|
|
}
|
|
|
|
msg->Put(this->m_timestamp);
|
|
}
|
|
|
|
// VERIFY: cb4c25ee manual
|
|
// OFFSET: 0x007F75D0
|
|
void PetNameCache::Unpack(CDataStore* msg) {
|
|
uint8_t hasDeclinedNames;
|
|
msg->Get(this->m_petNumber);
|
|
msg->GetString(this->m_name, sizeof(this->m_name));
|
|
msg->Get(hasDeclinedNames);
|
|
|
|
if (hasDeclinedNames) {
|
|
if (!this->m_declinedNames) {
|
|
this->m_declinedNames = static_cast<PetNameCache::DeclinedNames*>(SMemAlloc(sizeof(PetNameCache::DeclinedNames), __FILE__, __LINE__, 0));
|
|
}
|
|
|
|
for (uint32_t i = 0; i < 5; i++) {
|
|
msg->GetString(this->m_declinedNames->m_names[i], sizeof(this->m_declinedNames->m_names[i]));
|
|
}
|
|
}
|
|
|
|
uint32_t timestamp = 0;
|
|
msg->Get(timestamp);
|
|
this->m_timestamp = timestamp;
|
|
}
|