CWorkshop::RequestAvailableItems_Internal
0x0023db60 · 375 bytes · __thiscall
_ZN9CWorkshop30RequestAvailableItems_InternalE24EWorkshopEnumerationType
Decompiled
undefined (2 params)
/* CWorkshop::RequestAvailableItems_Internal(EWorkshopEnumerationType) */
undefined4 __thiscall CWorkshop::RequestAvailableItems_Internal(CWorkshop *this,undefined4 param_2)
{
char cVar1;
int *piVar2;
undefined4 uVar3;
longlong lVar4;
CWorkshop *local_40;
undefined4 *local_38;
undefined4 local_34;
undefined4 *local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 *local_20;
local_28 = 0;
local_2c = 8;
uVar3 = *(undefined4 *)(this + 0xa0);
local_30 = malloc(0x20);
local_24 = 1;
if (local_30 == (undefined4 *)0x0) {
local_38 = (undefined4 *)0x0;
}
else {
*local_30 = "workshop_item";
local_38 = local_30;
}
local_34 = 1;
local_20 = local_30;
/* try { // try from 0023dbb0 to 0023dcd5 has its CatchHandler @ 0023dcf7 */
piVar2 = (int *)GetISteamRemoteStorage();
if (piVar2 == (int *)0x0) {
uVar3 = 0;
}
else {
lVar4 = (**(code **)(*piVar2 + 0xd4))(piVar2,param_2,uVar3,0x14,7,&local_38,0);
if (lVar4 == 0) {
cVar1 = LoggingSystem_IsChannelEnabled(LOG_WORKSHOP,1);
if (cVar1 != '\0') {
LoggingSystem_Log(LOG_WORKSHOP,1,"RequestAvailableItems() call failed!\n");
}
this[0xa5] = (CWorkshop)0x1;
uVar3 = 0;
}
else {
if (*(int *)(this + 0x58) != 0 || *(int *)(this + 0x54) != 0) {
SteamAPI_UnregisterCallResult(this + 0x48,*(int *)(this + 0x54),*(int *)(this + 0x58));
}
local_40 = this + 0x48;
*(longlong *)(this + 0x54) = lVar4;
*(CWorkshop **)(this + 0x5c) = this;
*(code **)(this + 0x60) = Steam_OnEnumerateWorkshopFiles;
*(undefined4 *)(this + 100) = 0;
SteamAPI_RegisterCallResult(local_40,lVar4);
uVar3 = 1;
}
}
local_24 = 0;
CUtlMemory<char_const*,int>::Purge((CUtlMemory<char_const*,int> *)&local_30);
local_20 = local_30;
CUtlMemory<char_const*,int>::Purge((CUtlMemory<char_const*,int> *)&local_30);
return uVar3;
}
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.