CL4DGameStats::AddZombieDurationAttackStats
0x008dfe70 · 298 bytes · __thiscall
_ZN13CL4DGameStats28AddZombieDurationAttackStatsEv
Decompiled
undefined (1 param)
/* CL4DGameStats::AddZombieDurationAttackStats() */
void __thiscall CL4DGameStats::AddZombieDurationAttackStats(CL4DGameStats *this)
{
char *pcVar1;
int iVar2;
int iVar3;
KeyValues *in_stack_ffffffc8;
int local_20;
local_20 = 0;
if (0 < *(int *)(this + 0x494)) {
iVar3 = 0;
do {
in_stack_ffffffc8 = KeyValues::operator_new((KeyValues *)0x2c,(uint)in_stack_ffffffc8);
/* try { // try from 008dfec1 to 008dfec5 has its CatchHandler @ 008dff9a */
KeyValues::KeyValues(in_stack_ffffffc8,"L4D2DurationAttacks",(IKeyValuesSystem *)0x0,false);
KeyValues::SetInt(in_stack_ffffffc8,"TypeID",*(int *)(*(int *)(this + 0x488) + iVar3));
KeyValues::SetFloat(in_stack_ffffffc8,"Duration",
*(float *)(*(int *)(this + 0x488) + 4 + iVar3));
KeyValues::SetInt(in_stack_ffffffc8,"WasSaved",
(uint)*(byte *)(*(int *)(this + 0x488) + 8 + iVar3));
pcVar1 = *(char **)(gpGlobals + 0x3c);
if (pcVar1 == (char *)0x0) {
pcVar1 = "";
}
iVar3 = iVar3 + 0xc;
KeyValues::SetString(in_stack_ffffffc8,"MapID",pcVar1);
iVar2 = CSteamWorksGameStatsUploader::GetTimeSinceEpoch();
KeyValues::SetInt(in_stack_ffffffc8,"TimeSubmitted",iVar2);
CSteamWorksGameStatsUploader::AddStatsForUpload(steamGameStats,in_stack_ffffffc8);
local_20 = local_20 + 1;
} while (local_20 < *(int *)(this + 0x494));
}
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.