L L4D2node

CWorkshop::GetWorkshopItemByIndex

0x0023c9d0 · 42 bytes · __thiscall

_ZNK9CWorkshop22GetWorkshopItemByIndexEi

Decompiled

undefined (2 params)

/* CWorkshop::GetWorkshopItemByIndex(int) const */

undefined8 __thiscall CWorkshop::GetWorkshopItemByIndex(CWorkshop *this,int param_1)

{
  undefined4 uVar1;
  undefined4 uVar2;
  
  uVar1 = 0;
  uVar2 = 0;
  if ((-1 < param_1) && (param_1 < *(int *)(this + 0x108))) {
    uVar2 = *(undefined4 *)(*(int *)(this + 0xfc) + 4 + param_1 * 8);
    uVar1 = *(undefined4 *)(*(int *)(this + 0xfc) + param_1 * 8);
  }
  return CONCAT44(uVar2,uVar1);
}

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)