Files
wowdecomp/WoW/Source/Object/ObjectClient/SimpleScript.h
T
SatyandClaude Opus 5.5 175f55b399 Port spells, loot, effects, missiles, level-up and non-gameplay UI stand-ins
Gameplay:
- Spell system pieces, spell effects lifecycle (CEffect), special effects,
  procedural/loot effects, impact visuals
- Unit anim events: AnimEventCallback, HandleAnimEvent, HandleCombatAnimEvent,
  parry anims, vehicle bone grab/throw events
- CGUnit_C::CreateMissile (target, point, point-array overloads)
- Loot: CGLootInfo/LootWindow/LootDisplay, loot rolls, loot packets and scripts
- Bags/items: FindItem, container/inventory mirror handlers, UseContainerItem
  (sell/bank/mail/trade/auction/guild bank), UseItem, item lock/unlock
- Threat, power regen, XP gain, quest item updates, skill changes
- Packet_Group_9 (level up, item push, exploration, taxi, bind, roll, ...)
- ChatBubbleShow/Remove
- x64 fix: map entity callback param is uintptr_t (pointer was truncated)

Non-gameplay (parallel batch): chat channels/settings, chat bubble frame,
game/server time, minimap POIs and init, mail, class trainer, skills,
achievements, currencies, calendar, world states, world map arrow/ping,
commentator, merchant buyback, battleground/arena info, EnterWorld for
~15 UI modules

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-01 03:06:16 +02:00

60 lines
1.8 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 SimpleScriptFunctionDesc {
/* 0000 */ const char* m_name;
/* 0004 */ const char** m_args;
/* 0008 */ const char** m_stringArgs;
/* 000C */ const char* m_body;
/* 0010 */ const char** m_returns;
/* 0014 */ const char** m_stringReturns;
};
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);
SimpleScriptFunction* GetFunction(uint32_t handle);
uint32_t CreateFunction(int32_t id, const SimpleScriptFunctionDesc& desc);
int32_t Init(uint32_t bits);
void Uninit();
};
#endif