CL4DGameStats::AddWeaponStats
0x008e02b0 · 175 bytes · __thiscall
_ZN13CL4DGameStats14AddWeaponStatsEv
Decompiled
undefined (1 param)
/* CL4DGameStats::AddWeaponStats() */
void __thiscall CL4DGameStats::AddWeaponStats(CL4DGameStats *this)
{
int iVar1;
int iVar2;
L4D_Weapon_Stat_Data *this_00;
KeyValues *in_stack_ffffffd8;
iVar1 = 0;
this_00 = (L4D_Weapon_Stat_Data *)(this + 0x7c);
do {
in_stack_ffffffd8 = KeyValues::operator_new((KeyValues *)0x2c,(uint)in_stack_ffffffd8);
/* try { // try from 008e02f1 to 008e02f5 has its CatchHandler @ 008e035f */
KeyValues::KeyValues(in_stack_ffffffd8,"WeaponData",(IKeyValuesSystem *)0x0,false);
iVar2 = iVar1 + 1;
KeyValues::SetInt(in_stack_ffffffd8,"weaponid",iVar1);
L4D_Weapon_Stat_Data::SaveStatsToKeyValue(this_00,in_stack_ffffffd8);
iVar1 = CSteamWorksGameStatsUploader::GetTimeSinceEpoch();
KeyValues::SetInt(in_stack_ffffffd8,"TimeSubmitted",iVar1);
CSteamWorksGameStatsUploader::AddStatsForUpload(steamGameStats,in_stack_ffffffd8);
iVar1 = iVar2;
this_00 = this_00 + 0x14;
} while (iVar2 != 0x27);
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.