L L4D2node

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 into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)