Files
wowdecomp/WoW/Source/Object/ObjectClient/SimpleScript.h
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

49 lines
1.4 KiB
C++

#ifndef WOW_SOURCE_OBJECT_OBJECTCLIENT_SIMPLESCRIPT_H
#define WOW_SOURCE_OBJECT_OBJECTCLIENT_SIMPLESCRIPT_H
#include <cstddef>
#include <cstdint>
#include "Engine/Source/Storm/H/stpl.h"
struct SimpleScriptFunction {
/* 0000 */ int32_t m_id;
/* 0004 */ int32_t m_luaRef;
/* 0008 */ int32_t m_numArgs;
/* 000C */ int32_t m_numStringArgs;
/* 0010 */ int32_t m_numReturns;
/* 0014 */ int32_t m_numStringReturns;
};
struct SimpleScriptIO {
/* 0000 */ TSGrowableArray<double> m_numbers;
/* 0010 */ uint32_t m_stringSize;
/* 0014 */ uint32_t m_stringCount;
/* 0018 */ char* m_strings;
};
class CSimpleScriptManager {
public:
static void (*s_callbacks[16])(uint32_t);
static uint32_t s_callbackCount;
static CSimpleScriptManager* s_instance;
static void Create();
static void Destroy();
static int32_t RegisterCallback(void (*callback)(uint32_t));
static void UnregisterCallback(void (*callback)(uint32_t));
/* 0000 */ int32_t m_hashMask;
/* 0004 */ TSGrowableArray<SimpleScriptFunction>* m_buckets;
/* 0008 */ int32_t m_envRef;
CSimpleScriptManager();
int32_t CallFunction(uint32_t handle, const SimpleScriptIO& in, SimpleScriptIO& out);
void CopyGlobal(const char* name);
int32_t Execute(const char* script, const char* name);
uint32_t FindFunction(int32_t id);
int32_t Init(uint32_t bits);
void Uninit();
};
#endif