Exemplo n.º 1
0
        public MovableCannon(Mobile owner, Mobile hitch)
        {
            // make them siegable by default
            // XmlSiege( hitsmax, resistfire, resistphysical, wood, iron, stone)
            XmlAttach.AttachTo(this, new XmlSiege(100, 10, 10, 20, 30, 0));

            if (owner.Backpack == null)
            {
                UnHitch();
                return;
            }
            m_Owner    = owner;
            m_Hitch    = hitch;
            m_HControl = new HitchItem(m_Owner, m_Hitch, this);
            m_Owner.Backpack.DropItem(m_HControl);
            Weight   = 200;
            Map      = hitch.Map;
            Location = hitch.Location;
            switch (hitch.Direction)
            {
            case Direction.Up:
            case Direction.North:
            {
                AddComponent(new AddonComponent(0xE93), 0, 0, 0);
                AddComponent(new AddonComponent(0xE92), 0, 1, 0);
                AddComponent(new AddonComponent(0xE91), 0, 2, 0); break;
            }

            case Direction.Down:
            case Direction.South:
            {
                AddComponent(new AddonComponent(0xE8D), 0, 0, 0);
                AddComponent(new AddonComponent(0xE8C), 0, 1, 0);
                AddComponent(new AddonComponent(0xE8B), 0, 2, 0); break;
            }

            case Direction.Right:
            case Direction.East:
            {
                AddComponent(new AddonComponent(0xE8E), 0, 0, 0);
                AddComponent(new AddonComponent(0xE8F), 1, 0, 0);
                AddComponent(new AddonComponent(0xE90), 2, 0, 0); break;
            }

            case Direction.Left:
            case Direction.West:
            {
                AddComponent(new AddonComponent(0xE94), 0, 0, 0);
                AddComponent(new AddonComponent(0xE95), 1, 0, 0);
                AddComponent(new AddonComponent(0xE96), 2, 0, 0); break;
            }
            }
        }
Exemplo n.º 2
0
        public MovableCannon(Mobile owner, Mobile hitch)
        {
            if (owner.Backpack == null)
            {
                UnHitch();
                return;
            }
            m_Owner    = owner;
            m_Hitch    = hitch;
            m_HControl = new HitchItem(m_Owner, m_Hitch, this);
            m_Owner.Backpack.DropItem(m_HControl);
            Weight   = 400;
            Map      = hitch.Map;
            Location = hitch.Location;
            switch (hitch.Direction)
            {
            case Direction.Up:
            case Direction.North:
            {
                AddComponent(new AddonComponent(0xE93), 0, 0, 0);
                AddComponent(new AddonComponent(0xE92), 0, 1, 0);
                AddComponent(new AddonComponent(0xE91), 0, 2, 0); break;
            }

            case Direction.Down:
            case Direction.South:
            {
                AddComponent(new AddonComponent(0xE8D), 0, 0, 0);
                AddComponent(new AddonComponent(0xE8C), 0, 1, 0);
                AddComponent(new AddonComponent(0xE8B), 0, 2, 0); break;
            }

            case Direction.Right:
            case Direction.East:
            {
                AddComponent(new AddonComponent(0xE8E), 0, 0, 0);
                AddComponent(new AddonComponent(0xE8F), 1, 0, 0);
                AddComponent(new AddonComponent(0xE90), 2, 0, 0); break;
            }

            case Direction.Left:
            case Direction.West:
            {
                AddComponent(new AddonComponent(0xE94), 0, 0, 0);
                AddComponent(new AddonComponent(0xE95), 1, 0, 0);
                AddComponent(new AddonComponent(0xE96), 2, 0, 0); break;
            }
            }
        }
Exemplo n.º 3
0
		public MovableCannon(Mobile owner, Mobile hitch)
		{
           
			if( owner.Backpack == null )
			{
				UnHitch();
				return;
			}
			m_Owner = owner;
			m_Hitch = hitch;
			m_HControl = new HitchItem(m_Owner,m_Hitch,this);
			m_Owner.Backpack.DropItem(m_HControl);
			Weight = 400;
			Map = hitch.Map;
			Location = hitch.Location;
			switch (hitch.Direction)
			{
				case Direction.Up:
				case Direction.North:
					{
						AddComponent( new AddonComponent( 0xE93 ), 0, 0, 0);
						AddComponent( new AddonComponent( 0xE92 ), 0, 1, 0 );
						AddComponent( new AddonComponent( 0xE91 ), 0, 2, 0 ); break;
					}
				case Direction.Down:
				case Direction.South:
					{
						AddComponent( new AddonComponent( 0xE8D ), 0, 0, 0 );
						AddComponent( new AddonComponent( 0xE8C ), 0, 1, 0 );
						AddComponent( new AddonComponent( 0xE8B ), 0, 2, 0 ); break;
					}
				case Direction.Right:
				case Direction.East:
					{
						AddComponent( new AddonComponent( 0xE8E ), 0, 0, 0 );
						AddComponent( new AddonComponent( 0xE8F ), 1, 0, 0 );
						AddComponent( new AddonComponent( 0xE90 ), 2, 0, 0 ); break;
					}
				case Direction.Left:
				case Direction.West:
					{
						AddComponent( new AddonComponent( 0xE94 ), 0, 0, 0 );
						AddComponent( new AddonComponent( 0xE95 ), 1, 0, 0 );
						AddComponent( new AddonComponent( 0xE96 ), 2, 0, 0 ); break;
					}
			}
		}