DataTable_WriteClassInfosBuffer
0x001449a0 · 146 bytes · __cdecl
_Z31DataTable_WriteClassInfosBufferP11ServerClassP8bf_write
Decompiled
undefined (2 params)
/* DataTable_WriteClassInfosBuffer(ServerClass*, bf_write*) */
void DataTable_WriteClassInfosBuffer(ServerClass *param_1,bf_write *param_2)
{
ServerClass *pSVar1;
int iVar2;
if (param_1 != (ServerClass *)0x0) {
iVar2 = 0;
pSVar1 = param_1;
do {
pSVar1 = *(ServerClass **)(pSVar1 + 8);
iVar2 = iVar2 + 1;
} while (pSVar1 != (ServerClass *)0x0);
bf_write::WriteShort(param_2,iVar2);
do {
bf_write::WriteShort(param_2,*(int *)(param_1 + 0xc));
bf_write::WriteString(param_2,*(char **)param_1);
bf_write::WriteString(param_2,*(char **)(*(int *)(param_1 + 4) + 8));
param_1 = *(ServerClass **)(param_1 + 8);
} while (param_1 != (ServerClass *)0x0);
return;
}
bf_write::WriteShort(param_2,0);
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.