Files
wowdecomp/WoW/Source/Object/CGPetition.cpp
T
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

84 lines
2.4 KiB
C++

#include "CGPetition.h"
#include "Engine/Source/Base/CDataStore.h"
// VERIFY: f4e45cbe manual
// OFFSET: 0x00599FD0
CGPetition::CGPetition() {
this->m_id = 0;
this->m_ownerGuid = WOWGUID();
this->m_title[0] = '\0';
this->m_bodyText[0] = '\0';
this->m_minSignatures = 0;
this->m_maxSignatures = 0;
this->m_deadline = 0;
this->m_issueDate = 0;
this->m_allowedGuildId = 0;
this->m_allowedClasses = 0;
this->m_allowedRaces = 0;
this->m_allowedGenders = 0;
this->m_allowedMaxLevel = 0;
this->m_allowedMinLevel = 0;
for (uint32_t i = 0; i < 10; i++) {
this->m_choiceText[i][0] = '\0';
}
this->m_numChoices = 0;
this->m_muid = 0;
this->m_staticType = 0;
}
// VERIFY: a4660661 auto
// OFFSET: 0x0098CF70
void CGPetition::Pack(CDataStore* msg) {
msg->Put(static_cast<uint32_t>(this->m_id));
msg->Put(this->m_ownerGuid.m_guid);
msg->PutString(this->m_title);
msg->PutString(this->m_bodyText);
msg->Put(this->m_minSignatures);
msg->Put(this->m_maxSignatures);
msg->Put(this->m_deadline);
msg->Put(this->m_issueDate);
msg->Put(this->m_allowedGuildId);
msg->Put(this->m_allowedClasses);
msg->Put(this->m_allowedRaces);
msg->Put(this->m_allowedGenders);
msg->Put(this->m_allowedMinLevel);
msg->Put(this->m_allowedMaxLevel);
msg->Put(this->m_numChoices);
for (uint32_t i = 0; i < 10; i++) {
msg->PutString(this->m_choiceText[i]);
}
msg->Put(this->m_muid);
msg->Put(this->m_staticType);
}
// VERIFY: 114de37f auto
// OFFSET: 0x0098D090
void CGPetition::Unpack(CDataStore* msg) {
msg->Get(reinterpret_cast<uint32_t&>(this->m_id));
msg->Get(this->m_ownerGuid.m_guid);
msg->GetString(this->m_title, sizeof(this->m_title));
msg->GetString(this->m_bodyText, sizeof(this->m_bodyText));
msg->Get(this->m_minSignatures);
msg->Get(this->m_maxSignatures);
msg->Get(this->m_deadline);
msg->Get(this->m_issueDate);
msg->Get(this->m_allowedGuildId);
msg->Get(this->m_allowedClasses);
msg->Get(this->m_allowedRaces);
msg->Get(this->m_allowedGenders);
msg->Get(this->m_allowedMinLevel);
msg->Get(this->m_allowedMaxLevel);
msg->Get(this->m_numChoices);
for (uint32_t i = 0; i < 10; i++) {
msg->GetString(this->m_choiceText[i], sizeof(this->m_choiceText[i]));
}
msg->Get(this->m_muid);
msg->Get(this->m_staticType);
}