Ejemplo n.º 1
0
        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.");
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
        public BattleBuildingRegion(BattleBuilding ctrl, Region parent, Rectangle2D area, Point3D goloc, Map map) : base(null, map, parent, area)
        {
            GoLocation = goloc;

            _Ctrl = ctrl;

            Register();
        }
Ejemplo n.º 4
0
        public BattleBuildingRegion( BattleBuilding ctrl, Region parent, Rectangle2D area, Point3D goloc, Map map )
            : base(null, map, parent, area)
        {
            GoLocation = goloc;

            _Ctrl = ctrl;

            Register();
        }