CAchievementMgr::OnMapEvent
0x003e7e30 · 197 bytes · __thiscall
_ZN15CAchievementMgr10OnMapEventEPKci
Decompiled
undefined (3 params)
/* CAchievementMgr::OnMapEvent(char const*, int) */
void __thiscall CAchievementMgr::OnMapEvent(CAchievementMgr *this,char *param_1,int param_2)
{
CAchievementMgr *pCVar1;
CBaseAchievement *this_00;
int *piVar2;
int iVar3;
int iVar4;
if ((param_1 != (char *)0x0) && (*param_1 != '\0')) {
iVar4 = 0;
pCVar1 = this + param_2 * 0x14 + 0x110;
if (0 < *(int *)(pCVar1 + 0xc)) {
do {
this_00 = *(CBaseAchievement **)(*(int *)pCVar1 + iVar4 * 4);
iVar3 = V_strncmp(param_1,*(char **)(this_00 + 0x54),*(int *)(this_00 + 0x58));
if (iVar3 == 0) {
CBaseAchievement::OnComponentEvent(this_00,param_1);
return;
}
iVar4 = iVar4 + 1;
} while (iVar4 < *(int *)(pCVar1 + 0xc));
}
iVar4 = 0;
pCVar1 = this + param_2 * 0x14 + 0xe8;
if (0 < *(int *)(pCVar1 + 0xc)) {
do {
piVar2 = *(int **)(*(int *)pCVar1 + iVar4 * 4);
iVar4 = iVar4 + 1;
(**(code **)(*piVar2 + 0x70))(piVar2,param_1);
} while (iVar4 < *(int *)(pCVar1 + 0xc));
}
}
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.