L L4D2node

CCSGameRules::SetBlackMarketPrices

0x00439240 · 177 bytes · __thiscall

_ZN12CCSGameRules20SetBlackMarketPricesEb

Decompiled

undefined (2 params)

/* CCSGameRules::SetBlackMarketPrices(bool) */

void __thiscall CCSGameRules::SetBlackMarketPrices(CCSGameRules *this,bool param_1)

{
  int iVar1;
  CCSWeaponInfo *this_00;
  undefined4 uVar2;
  int iVar3;
  
  iVar3 = 1;
  do {
    this_00 = (CCSWeaponInfo *)GetWeaponInfo(iVar3);
    if (this_00 != (CCSWeaponInfo *)0x0) {
      if (param_1) {
        uVar2 = CCSWeaponInfo::GetDefaultPrice(this_00);
        *(undefined4 *)(this_00 + 0x9fc) = uVar2;
      }
      else {
        iVar1 = *(int *)(this + 0x2e4);
        if (iVar1 == 0) {
          GetBlackMarketPriceList(this);
          iVar1 = *(int *)(this + 0x2e4);
          if (iVar1 != 0) goto LAB_0043926a;
          iVar1 = 0;
        }
        else {
LAB_0043926a:
          iVar1 = (int)*(short *)(iVar1 + 0x72 + iVar3 * 2);
        }
        *(int *)(this_00 + 0x9fc) = iVar1;
        iVar1 = *(int *)(this + 0x2e4);
        if (iVar1 == 0) {
          GetBlackMarketPriceList(this);
          iVar1 = *(int *)(this + 0x2e4);
          if (iVar1 != 0) goto LAB_0043927f;
          iVar1 = 0;
        }
        else {
LAB_0043927f:
          iVar1 = (int)*(short *)(iVar1 + 2 + iVar3 * 2);
        }
        *(int *)(this_00 + 0xa04) = iVar1;
      }
    }
    iVar3 = iVar3 + 1;
    if (iVar3 == 0x38) {
      return;
    }
  } while( true );
}

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)