Files
SatyandClaude Opus 5.5 3b857f3eb0 Object port: object classes, object manager, input control, WOWGUID type
- CGObject_C base, CEffect, CObjectEffect/CObjectEffectManager effect states
- Unit, Player, Item/Container/Bag, Corpse, DynamicObject, GameObject and
  all GameObject type classes (vtables matched slot by slot), Movement,
  MovementShared, Missile, Vehicle/Passenger/Camera, combat log, caches
- Client object manager (0x4D3100-0x4D7880) incl. SMSG_UPDATE_OBJECT,
  SMSG_COMPRESSED_UPDATE_OBJECT, SMSG_DESTROY_OBJECT; type ctors/PostInit
- CGGameUI::CanPerformAction and the ready part of CGInputControl
- Layouts named from descriptor fields and code; CM2Model 0x134 matrix,
  CClientObjCreate tail, CGUnit_C/CGPlayer_C sizes 0x1008/0x1958
- WOWGUID struct replaces the IDB's WGUID low/high pair and guid uint64_t;
  SmartGUID derives from it; member functions returning a guid keep
  uint64_t (MSVC returns class types from members via hidden pointer);
  structs with 4-aligned guids in 12340 use pack(4)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-29 12:27:05 +02:00

34 lines
1.0 KiB
C++

#include "Corpse.h"
#include "WoW/Source/Object/Object.h"
// STATIC: 0x00AC5C34
const uint32_t CGCorpse::s_mirrorFields[3] = {
0x1B, 0x1C, 0x1E
};
// VERIFY: ebadb458 auto
// OFFSET: 0x004D4380
uint32_t CGCorpse::DescriptorToMirrorOffset(uint32_t offset, uint32_t size, int32_t local, uint32_t base) {
int32_t total = CGObject::TotalFieldsSaved();
return (offset & 3) + 4 * (total + CGCorpse::GetSavedIndexFromDataIndex((offset - base) >> 2, (size + 3) >> 2, local));
}
// VERIFY: a1e13f02 auto
// OFFSET: 0x004F5680
int32_t CGCorpse::TotalFieldsSaved() {
return CGObject::TotalFieldsSaved() + sizeof(CGCorpse::s_mirrorFields) / sizeof(CGCorpse::s_mirrorFields[0]);
}
// VERIFY: 04bd9804 auto
// OFFSET: 0x004F5690
uint32_t CGCorpse::GetSavedIndexFromDataIndex(uint32_t index, uint32_t count, int32_t local) {
for (uint32_t i = 0; i < sizeof(CGCorpse::s_mirrorFields) / sizeof(CGCorpse::s_mirrorFields[0]); i++) {
if (CGCorpse::s_mirrorFields[i] == index) {
return i;
}
}
return 30;
}