Ejemplo n.º 1
0
 string ILocalVariableConverter <string> .GetLocal(NwObject nwObject, string name)
 => NWScript.GetLocalString(nwObject, name);
Ejemplo n.º 2
0
 NwObject ILocalVariableConverter <NwObject> .GetLocal(NwObject nwObject, string name)
 => NWScript.GetLocalObject(nwObject, name).ToNwObject();
Ejemplo n.º 3
0
 void ILocalVariableConverter <NwObject> .SetLocal(NwObject nwObject, string name, NwObject value)
 => NWScript.SetLocalObject(nwObject, name, value);
Ejemplo n.º 4
0
 public static NwStore Create(string template, Location location, bool useAppearAnim = false, string newTag = "")
 {
     return(NwObject.CreateInternal <NwStore>(template, location, useAppearAnim, newTag));
 }
Ejemplo n.º 5
0
 void ILocalVariableConverter <Location> .ClearLocal(NwObject nwObject, string name)
 => NWScript.DeleteLocalLocation(nwObject, name);
Ejemplo n.º 6
0
        Guid ILocalVariableConverter <Guid> .GetLocal(NwObject nwObject, string name)
        {
            string stored = NWScript.GetLocalString(nwObject, name);

            return(string.IsNullOrEmpty(stored) ? Guid.Empty : Guid.Parse(stored));
        }
Ejemplo n.º 7
0
 void ILocalVariableConverter <Guid> .ClearLocal(NwObject nwObject, string name)
 => NWScript.DeleteLocalString(nwObject, name);
Ejemplo n.º 8
0
 void ILocalVariableConverter <float> .SetLocal(NwObject nwObject, string name, float value)
 => NWScript.SetLocalFloat(nwObject, name, value);
Ejemplo n.º 9
0
 void ILocalVariableConverter <float> .ClearLocal(NwObject nwObject, string name)
 => NWScript.DeleteLocalFloat(nwObject, name);
Ejemplo n.º 10
0
 void ILocalVariableConverter <string> .SetLocal(NwObject nwObject, string name, string value)
 => NWScript.SetLocalString(nwObject, name, value);
Ejemplo n.º 11
0
 float ILocalVariableConverter <float> .GetLocal(NwObject nwObject, string name)
 => NWScript.GetLocalFloat(nwObject, name);
Ejemplo n.º 12
0
 /// <summary>
 /// Attempts to resolve a living active game object from the specified UUID.
 /// </summary>
 /// <param name="objectId">The UUID of the object.</param>
 /// <returns>The game object with the given UUID, otherwise returns null if it does not exist.</returns>
 public static NwObject ToNwObject(this Guid objectId)
 {
     return(NwObject.CreateInternal(objectId));
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Attempts to resolve a living active game object from the specified UUID.
 /// </summary>
 /// <param name="objectId">The UUID of the object.</param>
 /// <typeparam name="T">The expected object type.</typeparam>
 /// <returns>The game object with the given UUID, otherwise returns null if it does not exist.</returns>
 /// <exception cref="InvalidCastException">Object is not type T. See <see cref="ToNwObjectSafe{T}"/> if null should be returned in this case.</exception>
 public static T ToNwObject <T>(this Guid objectId) where T : NwObject
 {
     return((T)NwObject.CreateInternal(objectId));
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Attempts to resolve a living active game object from the specified UUID.
 /// </summary>
 /// <param name="objectId">The UUID of the object.</param>
 /// <typeparam name="T">The expected object type. If the object is not this type.</typeparam>
 /// <returns>The game object with the given UUID and the specified type, otherwise returns null.</returns>
 public static T ToNwObjectSafe <T>(this Guid objectId) where T : NwObject
 {
     return(NwObject.CreateInternal(objectId) as T);
 }
Ejemplo n.º 15
0
 void ILocalVariableConverter <bool> .SetLocal(NwObject nwObject, string name, bool value)
 => NWScript.SetLocalInt(nwObject, name, value.ToInt());
Ejemplo n.º 16
0
 int ILocalVariableConverter <int> .GetLocal(NwObject nwObject, string name)
 => NWScript.GetLocalInt(nwObject, name);
Ejemplo n.º 17
0
 void ILocalVariableConverter <bool> .ClearLocal(NwObject nwObject, string name)
 => NWScript.DeleteLocalInt(nwObject, name);
Ejemplo n.º 18
0
 Location ILocalVariableConverter <Location> .GetLocal(NwObject nwObject, string name)
 => NWScript.GetLocalLocation(nwObject, name);
Ejemplo n.º 19
0
 void ILocalVariableConverter <Guid> .SetLocal(NwObject nwObject, string name, Guid value)
 => NWScript.SetLocalString(nwObject, name, value.ToUUIDString());
Ejemplo n.º 20
0
 void ILocalVariableConverter <Location> .SetLocal(NwObject nwObject, string name, Location value)
 => NWScript.SetLocalLocation(nwObject, name, value);
Ejemplo n.º 21
0
 bool ILocalVariableConverter <bool> .GetLocal(NwObject nwObject, string name)
 => NWScript.GetLocalInt(nwObject, name).ToBool();
Ejemplo n.º 22
0
 /// <summary>
 /// Executes the specified NWN script.
 /// If scriptName does not specify a compiled script, nothing happens.
 /// </summary>
 public static void Execute(string scriptName, NwObject target, params (string ParamName, string ParamValue)[] scriptParams)