L L4D2node

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 into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)