CAchievementMgr::Shutdown
0x003e9c10 · 255 bytes · __thiscall
_ZN15CAchievementMgr8ShutdownEv
Decompiled
undefined (1 param)
/* CAchievementMgr::Shutdown() */
void __thiscall CAchievementMgr::Shutdown(CAchievementMgr *this)
{
ushort uVar1;
int *piVar2;
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_00;
CAchievementMgr *pCVar3;
int local_20;
SaveGlobalState(this);
local_20 = 0;
this_00 = (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);
pCVar3 = this + 0x7c;
do {
for (uVar1 = 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(this_00); uVar1 != 0xffff;
uVar1 = 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(this_00,uVar1)) {
piVar2 = *(int **)((uint)uVar1 * 0x10 + *(int *)(this_00 + 4) + 0xc);
if (piVar2 != (int *)0x0) {
(**(code **)(*piVar2 + 4))(piVar2);
}
}
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>>
::RemoveAll(this_00);
*(undefined4 *)pCVar3 = 0;
local_20 = local_20 + 1;
*(undefined4 *)(pCVar3 + 0x28) = 0;
*(undefined4 *)(pCVar3 + 200) = 0;
*(undefined4 *)(pCVar3 + 0xf0) = 0;
*(undefined4 *)(pCVar3 + 0x50) = 0;
*(undefined4 *)(pCVar3 + 0x78) = 0;
*(undefined4 *)(pCVar3 + 0xa0) = 0;
*(undefined4 *)(pCVar3 + 0x24c) = 0;
*(undefined4 *)(pCVar3 + 0x274) = 0;
this_00 = this_00 + 0x1c;
pCVar3 = pCVar3 + 0x14;
} while (local_20 != 2);
piVar2 = (int *)(**(code **)(*g_pMatchFramework + 0x1c))(g_pMatchFramework);
(**(code **)(*piVar2 + 4))(piVar2,this + 0x18);
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.