public void OnSelectBuilding(Mobile from, object target, object state) { BattleBuilding bb = target as BattleBuilding; ArrayList list = state as ArrayList; if (bb == null) { from.SendAsciiMessage(0x25, "Select the building to add the items to!"); from.BeginTarget(18, false, TargetFlags.None, new TargetStateCallback(OnSelectBuilding), state); return; } int count = 0; foreach (Item i in list) { if (i != bb && !bb.Decorations.Contains(i)) { bb.Decorations.Add(i); count++; } } from.SendAsciiMessage(count.ToString() + " items added to building."); }
public override void ExecuteList(CommandEventArgs e, ArrayList list) { BattleBuilding bb = null; foreach (Item item in list) { if (item is BattleBuilding) { if (bb != null) { LogFailure("You can only select one BattleBuilding at a time!"); return; } bb = item as BattleBuilding; } } if (bb == null) { e.Mobile.SendAsciiMessage("Select the building to add the items to."); e.Mobile.BeginTarget(18, false, TargetFlags.None, new TargetStateCallback(OnSelectBuilding), list); return; } else { OnSelectBuilding(e.Mobile, bb, list); } }
public BattleBuildingRegion(BattleBuilding ctrl, Region parent, Rectangle2D area, Point3D goloc, Map map) : base(null, map, parent, area) { GoLocation = goloc; _Ctrl = ctrl; Register(); }
public BattleBuildingRegion( BattleBuilding ctrl, Region parent, Rectangle2D area, Point3D goloc, Map map ) : base(null, map, parent, area) { GoLocation = goloc; _Ctrl = ctrl; Register(); }