L L4D2node

CScriptResponseCriteria::GetValue

0x00b447e0 · 194 bytes · __thiscall

_ZN23CScriptResponseCriteria8GetValueEP9HSCRIPT__PKc

Decompiled

undefined (3 params)

/* CScriptResponseCriteria::GetValue(HSCRIPT__*, char const*) */

CScriptResponseCriteria * __thiscall
CScriptResponseCriteria::GetValue(CScriptResponseCriteria *this,HSCRIPT__ *param_1,char *param_2)

{
  code *pcVar1;
  ScriptClassDesc_t *pSVar2;
  int *piVar3;
  int iVar4;
  char *pcVar5;
  AI_CriteriaSet local_2c [18];
  short local_1a;
  
  if (param_1 != (HSCRIPT__ *)0x0) {
    pcVar1 = *(code **)(*g_pScriptVM + 0x68);
    pSVar2 = GetScriptDesc<CBaseEntity>((CBaseEntity *)0x0);
    piVar3 = (int *)(*pcVar1)(g_pScriptVM,param_1,pSVar2);
    if (piVar3 != (int *)0x0) {
      AI_CriteriaSet::AI_CriteriaSet(local_2c);
                    /* try { // try from 00b44835 to 00b44878 has its CatchHandler @ 00b448ae */
      (**(code **)(*piVar3 + 0x200))(piVar3,local_2c);
      iVar4 = AI_CriteriaSet::FindCriterionIndex(local_2c,param_2);
      if ((iVar4 < 0) || (local_1a <= iVar4)) {
        this = (CScriptResponseCriteria *)&DAT_00d539c2;
      }
      else {
        pcVar5 = (char *)AI_CriteriaSet::GetValue(local_2c,iVar4);
        V_strncpy((char *)this,pcVar5,0x40);
      }
      AI_CriteriaSet::~AI_CriteriaSet(local_2c);
      return this;
    }
  }
  return (CScriptResponseCriteria *)&DAT_00d539c2;
}

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)