CAchievementMgr::Steam_OnUserStatsStored
0x003e9b20 · 218 bytes · __thiscall
_ZN15CAchievementMgr23Steam_OnUserStatsStoredEP17UserStatsStored_t
Decompiled
undefined (2 params)
/* CAchievementMgr::Steam_OnUserStatsStored(UserStatsStored_t*) */
void __thiscall
CAchievementMgr::Steam_OnUserStatsStored(CAchievementMgr *this,UserStatsStored_t *param_1)
{
int *piVar1;
char cVar2;
ushort uVar3;
int iVar4;
if (*(int *)(param_1 + 8) == 1) {
if (0 < *(int *)(this + 0x2c8)) {
iVar4 = *(int *)(this + 0x2c8) + -1;
if (iVar4 == 0) {
*(undefined4 *)(this + 0x2c8) = 0;
}
else {
_V_memmove(*(void **)(this + 700),(void *)((int)*(void **)(this + 700) + 4),iVar4 * 4);
*(int *)(this + 0x2c8) = *(int *)(this + 0x2c8) + -1;
}
}
for (uVar3 = CUtlRBTree<CUtlMap<int,CBaseAchievement*,unsigned_short>::Node_t,unsigned_short,CUtlMap<int,CBaseAchievement*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CBaseAchievement*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::FirstInorder((CUtlRBTree<CUtlMap<int,CBaseAchievement*,unsigned_short>::Node_t,unsigned_short,CUtlMap<int,CBaseAchievement*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CBaseAchievement*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*)(this + 0x38)); uVar3 != 0xffff;
uVar3 = CUtlRBTree<CUtlMap<int,CBaseAchievement*,unsigned_short>::Node_t,unsigned_short,CUtlMap<int,CBaseAchievement*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CBaseAchievement*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::NextInorder((CUtlRBTree<CUtlMap<int,CBaseAchievement*,unsigned_short>::Node_t,unsigned_short,CUtlMap<int,CBaseAchievement*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CBaseAchievement*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*)(this + 0x38),uVar3)) {
piVar1 = *(int **)((uint)uVar3 * 0x10 + *(int *)(this + 0x3c) + 0xc);
cVar2 = (**(code **)(*piVar1 + 0x50))(piVar1);
if (cVar2 == '\0') {
(**(code **)(*piVar1 + 0x78))(piVar1);
}
}
return;
}
DevMsg("CAchievementMgr: Failed to upload stats to Steam, EResult %d!\n");
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.