- Fix CMap::GetChunkFacets: impassable test uses the chunk MapObjFlag (MAPOBJ_FLAG_IMPASSABLE at +0xC) like 12340, not MCNK header flag 0x40 (vertex colours). Most chunks got 32000-high wall facets, so the player could jump but not walk. - Ship paths: GetPosition, path time, accel/decel distance, roll/pitch. - Transports: Transport::UpdateMovement, CollideWithTransport, owner matrix. - Map objects: IsAllLoaded, footprints, TriData query chain (QueryTris, GetTrisTerrain/Chunk, GetTriSubchunk, QueryTrisMapObjDefs), QueryIntersectingModels. - Water ripples, projected-texture shadow drawing (shadow.cpp). - World states, LFG best random dungeon, quest POI, ComSat session lookup, blood record, virtual items, guild roster query. - Logout path: tradeskill close, LCD, DBCache_ClearPending, chat/macro/ saved-variable/account-data saving, tracked quests/achievements/ tutorials, UnloadAddOns, SaveAddOnEnableState, ~CGWorldFrame, SmartScreenRectShutdown. - Fixes: TriData batch heights stored as float* (was truncating uint32 on x64), TimeInRange is a ShipPath member, ComSat lookup takes the session type, roll/pitch names swapped in MapObjTransport::UpdateMovement, removed windows.h from Object/Passenger.h. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
71 lines
2.1 KiB
C++
71 lines
2.1 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;
|
|
|
|
SimpleScriptIO(double* numbers, uint32_t count);
|
|
};
|
|
|
|
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();
|
|
};
|
|
|
|
// INLINED
|
|
inline SimpleScriptIO::SimpleScriptIO(double* numbers, uint32_t count) {
|
|
this->m_numbers.m_alloc = count;
|
|
this->m_numbers.m_data = numbers;
|
|
this->m_stringSize = 0;
|
|
this->m_stringCount = 0;
|
|
this->m_strings = nullptr;
|
|
}
|
|
|
|
#endif
|