public override void OnCommand(OrbClientInfo client, OrbCommandArgs cmdArgs) { if (cmdArgs == null || !(cmdArgs is MoveItemsArgs)) { return; } MoveItemsArgs args = (MoveItemsArgs)cmdArgs; if (args.Count > 0) { int xoffset = args.Xoffset; int yoffset = args.Yoffset; int zoffset = args.Zoffset; int[] serials = args.ItemSerials; for (int i = 0; i < serials.Length; ++i) { Item item = World.FindItem(serials[i]); if (item == null) { continue; } int newX = item.X + xoffset; int newY = item.Y + yoffset; int newZ = item.Z + zoffset; item.Location = new Point3D(newX, newY, newZ); } } }
private void OnNudgeItems(short zoffset) { MoveItemsArgs args = new MoveItemsArgs(_serials); args.Zoffset = zoffset; Connection.SendMoveItemsCommand(args); }
private void OnMoveItems(short xoffset, short yoffset) { MoveItemsArgs args = new MoveItemsArgs(_serials); args.Xoffset = xoffset; args.Yoffset = yoffset; Connection.SendMoveItemsCommand(args); }
public static void SendMoveItemsCommand(MoveItemsArgs args) { if (args == null || args.ItemSerials == null || args.ItemSerials.Length == 0) { return; } Ultima.Client.BringToTop(); ExecuteCommand("UOAR_MoveItems", args); }