CWorkshop::AddAddOnFile
0x0023d7a0 · 155 bytes · __thiscall
_ZN9CWorkshop12AddAddOnFileERK19PublishedFileInfo_t
Decompiled
undefined (2 params)
/* CWorkshop::AddAddOnFile(PublishedFileInfo_t const&) */
undefined4 __thiscall CWorkshop::AddAddOnFile(CWorkshop *this,PublishedFileInfo_t *param_1)
{
int iVar1;
int *piVar2;
int iVar3;
undefined4 uVar4;
iVar1 = *(int *)(this + 0xf4);
if (0 < iVar1) {
piVar2 = *(int **)(this + 0xe8);
if (piVar2[1] != *(int *)(param_1 + 4) || *piVar2 != *(int *)param_1) {
iVar3 = 0;
do {
iVar3 = iVar3 + 1;
if (iVar3 == iVar1) goto LAB_0023d7f7;
} while (piVar2[iVar3 * 2 + 1] != *(int *)(param_1 + 4) ||
piVar2[iVar3 * 2] != *(int *)param_1);
if (iVar3 == -1) goto LAB_0023d7f7;
}
return 1;
}
LAB_0023d7f7:
CUtlVector<unsigned_long_long,CUtlMemory<unsigned_long_long,int>>::InsertBefore
((CUtlVector<unsigned_long_long,CUtlMemory<unsigned_long_long,int>> *)(this + 0xe8),
iVar1,(ulonglong *)param_1);
uVar4 = CreateAddOnFileRequest(this,param_1);
return uVar4;
}
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.