GCSDK::CSchema::AutoIncrementField
0x0008d980 · 314 bytes · __thiscall
_ZN5GCSDK7CSchema18AutoIncrementFieldEPc
Decompiled
undefined (2 params)
/* GCSDK::CSchema::AutoIncrementField(char*) */
void __thiscall GCSDK::CSchema::AutoIncrementField(CSchema *this,char *param_1)
{
uint *puVar1;
char cVar2;
int iVar3;
int iVar4;
int in_GS_OFFSET;
CDbgFmtMsg local_120 [256];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iVar3 = FindIField(this,param_1);
if (iVar3 != -1) goto LAB_0008d9b0;
CDbgFmtMsg::CDbgFmtMsg
(local_120,"Could not find index column \"%s\" on table \"%s\"",param_1,this + 8);
iVar4 = LoggingSystem_LogAssert
("%s (%d) : %s\n","/data/src/gcsdk/sqlaccess/schema.cpp",0x40a,local_120);
if (iVar4 != 1) goto LAB_0008d9b0;
cVar2 = ShouldUseNewAssertDialog();
if (cVar2 == '\0') {
LAB_0008da42:
raise(5);
}
else {
CDbgFmtMsg::CDbgFmtMsg
(local_120,"Could not find index column \"%s\" on table \"%s\"",param_1,this + 8);
/* try { // try from 0008daad to 0008dab1 has its CatchHandler @ 0008dac5 */
cVar2 = DoNewAssertDialog("/data/src/gcsdk/sqlaccess/schema.cpp",0x40a,local_120);
if (cVar2 != '\0') goto LAB_0008da42;
}
_ExitOnFatalAssert("/data/src/gcsdk/sqlaccess/schema.cpp",0x40a);
LAB_0008d9b0:
puVar1 = (uint *)(iVar3 * 0x118 + *(int *)(this + 0x88) + 0x110);
*puVar1 = *puVar1 | 8;
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
SourceMod gamedata
paste intoaddons/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.
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.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.