CDmxElement::RenameAttribute
0x00be7420 · 147 bytes · __thiscall
_ZN11CDmxElement15RenameAttributeEPKcS1_
Decompiled
undefined (3 params)
/* CDmxElement::RenameAttribute(char const*, char const*) */
void __thiscall CDmxElement::RenameAttribute(CDmxElement *this,char *param_1,char *param_2)
{
int iVar1;
int iVar2;
this[0x2e] = (CDmxElement)((char)this[0x2e] + '\x01');
/* try { // try from 00be743d to 00be7441 has its CatchHandler @ 00be74ba */
iVar1 = _V_stricmp(param_1,param_2);
if (iVar1 != 0) {
/* try { // try from 00be7467 to 00be74b7 has its CatchHandler @ 00be74ba */
iVar1 = FindAttribute(this,param_1);
if (-1 < iVar1) {
iVar2 = FindAttribute(this,param_2);
if (iVar2 < 0) {
this[0x2f] = (CDmxElement)((byte)this[0x2f] | 1);
CDmxAttribute::SetName(*(char **)(*(int *)this + iVar1 * 4));
}
else {
Warning("Tried to rename from \"%s\" to \"%s\", but \"%s\" already exists!\n",param_1,
param_2,param_2);
}
}
}
LockForChanges(this,false);
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.