public static void StackPushObject(NWN.Object value, bool defAsObjSelf) { if (value == null) { value = defAsObjSelf ? OBJECT_SELF : OBJECT_INVALID; } StackPushObject_Native(value.m_ObjId); }
private static void ExecuteClosure(ulong eventId) { Closure closure = m_Closures[eventId]; OBJECT_SELF = closure.m_Object; BeginClosure(closure.m_Object.m_ObjId); closure.m_Func(); m_Closures.Remove(eventId); }
public static void ClosureActionDoCommand(NWN.Object obj, ActionDelegate func) { if (ClosureActionDoCommand_Native(obj.m_ObjId, m_NextEventId) != 0) { m_Closures.Add(m_NextEventId++, new Closure { m_Object = obj, m_Func = func }); } }
public static void ClosureActionDoCommand(NWN.Object obj, ActionDelegate func) { if (NativeFunctions.ClosureActionDoCommand(obj.Self, NextEventId) != 0) { Closures.Add(NextEventId++, new Closure { OwnerObject = obj, Run = func }); } }
public static int OnRunScript(string script, uint oidSelf) { int ret = 0; OBJECT_SELF = oidSelf; ScriptContexts.Push(new ScriptContext { OwnerObject = oidSelf, ScriptName = script }); try { ret = NWN.Entrypoints.OnRunScript(script, oidSelf); } catch (Exception e) { Console.WriteLine(e.ToString()); } ScriptContexts.Pop(); OBJECT_SELF = ScriptContexts.Count == 0 ? OBJECT_INVALID : ScriptContexts.Peek().OwnerObject; return(ret); }
public NWArea(Object o) : base(o) { }
public override int GetHashCode() { return(Object.GetHashCode()); }
public static void AssignCommand(NWN.Object oActionSubject, ActionDelegate aActionToAssign) { Internal.ClosureAssignCommand(oActionSubject, aActionToAssign); }
public NWPlaceable(Object nwnObject) : base(nwnObject) { }
private static void PopScriptContext() { s_ScriptContexts.Pop(); OBJECT_SELF = s_ScriptContexts.Count == 0 ? OBJECT_INVALID : s_ScriptContexts.Peek(); }
private static void PushScriptContext(uint oid) { s_ScriptContexts.Push(oid); OBJECT_SELF = oid; }
public NWPlayer(Object nwnObject) : base(nwnObject) { }