public static Invoke ( Server.Mobile from, Server.Point3D start, Server.Point3D end, string args ) : void | ||
from | Server.Mobile | |
start | Server.Point3D | |
end | Server.Point3D | |
args | string | |
return | void |
protected override void OnTarget(Mobile from, object o) { IPoint3D p = o as IPoint3D; if (p != null) { if (p is Item) { p = ((Item)p).GetWorldTop(); } else if (p is Mobile) { p = ((Mobile)p).Location; } Add.Invoke(from, new Point3D(p), new Point3D(p), m_Args); } }
protected override void OnTarget(Mobile from, object o) { IPoint3D p = o as IPoint3D; if (p != null) { if (p is Item item) { p = item.GetWorldTop(); } else if (p is Mobile mobile) { p = mobile.Location; } Point3D point = new Point3D(p); Add.Invoke(from, point, point, m_Args); } }
public override void Execute(CommandEventArgs e, object obj) { IPoint3D p = obj as IPoint3D; if (p == null) { return; } if (p is Item) { p = ((Item)p).GetWorldTop(); } else if (p is Mobile) { p = ((Mobile)p).Location; } Add.Invoke(e.Mobile, new Point3D(p), new Point3D(p), e.Arguments); }
public static void TileXYZ_OnCommand(CommandEventArgs e) { if (e.Length >= 6) { Point3D p = new Point3D(e.GetInt32(0), e.GetInt32(1), e.GetInt32(4)); Point3D p2 = new Point3D(p.X + e.GetInt32(2) - 1, p.Y + e.GetInt32(3) - 1, e.GetInt32(4)); string[] subArgs = new string[e.Length - 5]; for (int i = 0; i < subArgs.Length; ++i) { subArgs[i] = e.Arguments[i + 5]; } Add.Invoke(e.Mobile, p, p2, subArgs); } else { e.Mobile.SendMessage("Format: TileXYZ <x> <y> <w> <h> <z> <type> [params] [set {<propertyName> <value> ...}]"); } }
private static void InternalXYZ_OnCommand(CommandEventArgs e, bool outline) { if (e.Length >= 6) { Point3D p = new Point3D(e.GetInt32(0), e.GetInt32(1), e.GetInt32(4)); Point3D p2 = new Point3D(p.X + e.GetInt32(2) - 1, p.Y + e.GetInt32(3) - 1, e.GetInt32(4)); string[] subArgs = new string[e.Length - 5]; for (int i = 0; i < subArgs.Length; ++i) { subArgs[i] = e.Arguments[i + 5]; } Add.Invoke(e.Mobile, p, p2, subArgs, null, outline, false); } else { e.Mobile.SendMessage("Format: {0}XYZ <x> <y> <w> <h> <z> <type> [params] [set {{<propertyName> <value> ...}}]", outline ? "Outline" : "Tile"); } }
public override void ExecuteList(CommandEventArgs e, ArrayList list) { if (e.Arguments.Length < 1) { // make sure we have at least an item LogFailure(Usage); return; } ArrayList packs = new ArrayList(list.Count); for (int i = 0; i < list.Count; ++i) { object obj = list[i]; Container cont = null; if (obj is Mobile) { cont = ((Mobile)obj).Backpack; } else if (obj is Container) { cont = (Container)obj; } if (cont != null) { packs.Add(cont); } else { LogFailure("That is not a container."); } } Add.Invoke(e.Mobile, e.Mobile.Location, e.Mobile.Location, e.Arguments, packs); }