- Grunt::ServerLink: all CMD_GRUNT_* handlers, send helpers, features/strings, command table 0xB24D70, s_localeIds 0xAD3004, Pending::Remove (dead server-side link, docs/0x008CE200.md); ServerLink.h stub removed - PetAction type for CGPetInfo::m_actions / pet spell actions / cursor pet action, SetAutocast 0x5D32F0 - CParticleEmitter2 fields 0x98-0x11F moved into CParticleEmitter2::Params (ctor 0x979250) - fixed16(float), C3Vector::FlushDenormals, CGxuLightQueue + static 0xC7C074, CAaSphere(), CMapLowDetail(), C2Vector()/C4Plane() out of line, SpellHistory dtor, CGDynamicObject_C GetScale/GetRawFacing - DB record operator= (PetNameCache, CGPetition, DanceCache): fixes the shallow-copy double free in AddItem - ClientSetTimer(delay, handler, param) with its five callers, IOMd5Unit::Create without container, CDataStore::GetByte / Get(int32_t&), WDataStore::GetHeaderSpace, TSHashTable::Head, TSList::IsEmpty - CameraTurnPlayer calls CVehicleCamera_C::IsTransitioningFacing 0x5FAA10 (was IsHierarchyChasingFacing) - OFFSET additions: TSHashTable::Unlink, TInstanceId dtor, DBCACHEHASH dtor (+ ItemNameCache_C dtor), CDataStoreCache ctor, BitUnpacker/RunningAverageCalculator deleting dtors, CGTooltip::GetObjectType Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
70 lines
1.9 KiB
C++
70 lines
1.9 KiB
C++
#include "DanceCache.h"
|
|
#include <cstring>
|
|
#include "Engine/Source/Base/CDataStore.h"
|
|
#include "Engine/Source/Storm/H/storm.h"
|
|
|
|
// INLINED
|
|
DanceCache::DanceCache() {
|
|
this->m_id = 0;
|
|
this->m_guid = WOWGUID();
|
|
this->m_name[0] = '\0';
|
|
this->m_data = nullptr;
|
|
this->m_dataCount = 0;
|
|
this->unk_0098 = 0;
|
|
}
|
|
|
|
// INLINED
|
|
DanceCache::~DanceCache() {
|
|
delete[] this->m_data;
|
|
}
|
|
|
|
// VERIFY: 57b64e71 manual
|
|
// OFFSET: 0x006688B0
|
|
DanceCache& DanceCache::operator=(const DanceCache& source) {
|
|
this->m_id = source.m_id;
|
|
this->m_guid = source.m_guid;
|
|
SStrCopy(this->m_name, source.m_name, sizeof(this->m_name));
|
|
|
|
if (this->m_dataCount < source.m_dataCount) {
|
|
if (this->m_data) {
|
|
SMemReAlloc(this->m_data, source.m_dataCount, __FILE__, __LINE__, 0);
|
|
} else {
|
|
this->m_data = new (__FILE__, __LINE__) DANCEMOVE[source.m_dataCount];
|
|
}
|
|
}
|
|
|
|
memcpy(this->m_data, source.m_data, 4 * source.m_dataCount);
|
|
this->m_dataCount = source.m_dataCount;
|
|
this->unk_0098 = source.unk_0098;
|
|
|
|
return *this;
|
|
}
|
|
|
|
// VERIFY: cb0294c9 manual
|
|
// OFFSET: 0x0098D290
|
|
void DanceCache::Pack(CDataStore* msg) {
|
|
msg->Put(static_cast<uint32_t>(this->m_id));
|
|
*msg << static_cast<const SmartGUID&>(this->m_guid);
|
|
msg->PutString(this->m_name);
|
|
msg->Put(this->m_dataCount);
|
|
msg->PutData(this->m_data, 4 * this->m_dataCount);
|
|
msg->Put(this->unk_0098);
|
|
}
|
|
|
|
// VERIFY: 54057452 manual
|
|
// OFFSET: 0x0098D300
|
|
void DanceCache::Unpack(CDataStore* msg) {
|
|
msg->Get(reinterpret_cast<uint32_t&>(this->m_id));
|
|
|
|
if (this->m_id < 0) {
|
|
return;
|
|
}
|
|
|
|
*msg >> static_cast<SmartGUID&>(this->m_guid);
|
|
msg->GetString(this->m_name, sizeof(this->m_name));
|
|
msg->Get(this->m_dataCount);
|
|
this->m_data = new (__FILE__, __LINE__) DANCEMOVE[this->m_dataCount];
|
|
msg->GetData(this->m_data, 4 * this->m_dataCount);
|
|
msg->Get(this->unk_0098);
|
|
}
|