Rule::RecursiveGetValueForRuleCriterionByName
0x005b5f30 · 135 bytes · __thiscall
_ZN4Rule39RecursiveGetValueForRuleCriterionByNameEP15CResponseSystemPK8CriteriaRK10CUtlSymbol
Decompiled
undefined (4 params)
/* Rule::RecursiveGetValueForRuleCriterionByName(CResponseSystem*, Criteria const*, CUtlSymbol
const&) */
int __thiscall
Rule::RecursiveGetValueForRuleCriterionByName
(Rule *this,CResponseSystem *param_1,Criteria *param_2,CUtlSymbol *param_3)
{
ushort *puVar1;
int iVar2;
int iVar3;
ushort *puVar4;
if (param_2 != (Criteria *)0x0) {
if (*(int *)(param_2 + 0x1e) < 1) {
if (*(short *)param_2 != *(short *)param_3) {
return 0;
}
return *(int *)(param_2 + 2);
}
puVar4 = *(ushort **)(param_2 + 0x16);
iVar2 = *(int *)(param_1 + 0x48);
puVar1 = puVar4 + *(int *)(param_2 + 0x1e);
do {
iVar3 = RecursiveGetValueForRuleCriterionByName
(this,param_1,(Criteria *)(iVar2 + 0xc + (uint)*puVar4 * 0x34),param_3);
if (iVar3 != 0) {
return iVar3;
}
puVar4 = puVar4 + 1;
} while (puVar4 != puVar1);
}
return 0;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.