ResponseRulePartition::GetDictsForCriteria
0x005b6af0 · 275 bytes · __thiscall
_ZN21ResponseRulePartition19GetDictsForCriteriaEP15CUtlVectorFixedIP13CResponseDictIP4RuletELj2EERK14AI_CriteriaSet
Decompiled
undefined (3 params)
/* ResponseRulePartition::GetDictsForCriteria(CUtlVectorFixed<CResponseDict<Rule*, unsigned short>*,
2u>*, AI_CriteriaSet const&) */
void __thiscall
ResponseRulePartition::GetDictsForCriteria
(ResponseRulePartition *this,CUtlVectorFixed *param_1,AI_CriteriaSet *param_2)
{
int iVar1;
char *pcVar2;
char *pcVar3;
char *local_30;
ResponseRulePartition *local_20 [4];
*(undefined4 *)(param_1 + 8) = 0;
*(CUtlVectorFixed **)(param_1 + 0xc) = param_1;
iVar1 = AI_CriteriaSet::FindCriterionIndex(param_2,"Who");
local_30 = (char *)0x0;
if (iVar1 != -1) {
local_30 = (char *)AI_CriteriaSet::GetValue(param_2,iVar1);
}
pcVar3 = (char *)0x0;
iVar1 = AI_CriteriaSet::FindCriterionIndex(param_2,"Concept");
if (iVar1 != -1) {
pcVar3 = (char *)AI_CriteriaSet::GetValue(param_2,iVar1);
}
iVar1 = AI_CriteriaSet::FindCriterionIndex(param_2,"Subject");
pcVar2 = (char *)0x0;
if (iVar1 != -1) {
pcVar2 = (char *)AI_CriteriaSet::GetValue(param_2,iVar1);
}
iVar1 = GetBucketForSpeakerAndConcept(this,local_30,pcVar3,pcVar2);
local_20[0] = this + iVar1 * 0x38;
CUtlVector<CResponseDict<Rule*,unsigned_short>*,CUtlMemoryFixed<CResponseDict<Rule*,unsigned_short>*,2u,0>>
::InsertBefore((CUtlVector<CResponseDict<Rule*,unsigned_short>*,CUtlMemoryFixed<CResponseDict<Rule*,unsigned_short>*,2u,0>>
*)param_1,*(int *)(param_1 + 8),(CResponseDict **)local_20);
iVar1 = GetBucketForSpeakerAndConcept(this,local_30,pcVar3,(char *)0x0);
local_20[0] = this + iVar1 * 0x38;
CUtlVector<CResponseDict<Rule*,unsigned_short>*,CUtlMemoryFixed<CResponseDict<Rule*,unsigned_short>*,2u,0>>
::InsertBefore((CUtlVector<CResponseDict<Rule*,unsigned_short>*,CUtlMemoryFixed<CResponseDict<Rule*,unsigned_short>*,2u,0>>
*)param_1,*(int *)(param_1 + 8),(CResponseDict **)local_20);
return;
}
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.