Script Function: deactivate

From Ultima Online: The Second Age
Revision as of 01:09, 21 October 2018 by Grimoric (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
function void deactivate(obj this)
{
  if (hasObjVar(this, "_objectId") && hasObjVar(this, "_objectType"))
  {
    obj objectId = getobjvar_obj(this, "_objectId");
    int objectType = getobjvar_int(this, "_objectType");
    deleteIfValid(objectId, objectType);
    removeObjVar(this, "_objectId");
    processTriggerCmds(this, "d");
  }
  return;
}
function void deactivate(obj this)
{
  if (hasObjVar(this, "objectId") && hasObjVar(this, "objectType"))
  {
    obj objectId = getobjvar_obj(this, "objectId");
    int objectType = getobjvar_int(this, "objectType");
    deleteIfValid(objectId, objectType);
    removeObjVar(this, "objectId");
    removeObjVar(this, "objectType");
    processTriggerCmds(this, "d");
  }
  return;
}