protected override void Upgrade( Mobile m )
        {
            base.Upgrade( m );

            BombBag bag = (BombBag)m.Backpack.FindItemByType( typeof( BombBag ) );

            if( bag != null && bag.Detonator == null )
            {
                BombDetonator detonator = new BombDetonator( bag );
                bag.Detonator = detonator;
                m.Backpack.DropItem( detonator );
            }
        }
예제 #2
0
        protected override void Upgrade(Mobile m)
        {
            base.Upgrade(m);


            var bag = (BombBag)m.Backpack.FindItemByType(typeof(BombBag));

            if (bag != null && bag.Detonator == null)
            {
                var detonator = new BombDetonator(bag);
                bag.Detonator = detonator;
                m.Backpack.DropItem(detonator);
            }
        }
예제 #3
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            _Owner       = reader.ReadMobile();
            MaxBombs     = reader.ReadInt();
            BombStrength = reader.ReadInt();

            _SpeedUpgraded = reader.ReadBool();

            Detonator   = (BombDetonator)reader.ReadItem();
            ControlItem = (BombermanControlItem)reader.ReadItem();

            int count = reader.ReadInt();

            for (int i = 0; i < count; i++)
            {
                Bombs.Add((Bomb)reader.ReadItem());
            }

            Active = reader.ReadBool();
        }
		protected override void PrimePlayers()
		{
			base.PrimePlayers();
			
			for( int i = 0; i < Players.Count; i++ )
			{
				Mobile player = Players[i];
				
				Point3D movepoint;
				switch( i )
				{
					case 0:
					{
						movepoint = new Point3D( X + BoardOffset.X + 1, Y + BoardOffset.Y + 1, Z + BoardOffset.Z );
						break;
					}
					case 1:
					{
						movepoint = new Point3D( X + BoardOffset.X + BoardWidth - 2, Y + BoardOffset.Y + 1, Z + BoardOffset.Z );
						break;
					}
					case 2:
					{
						movepoint = new Point3D( X + BoardOffset.X + 1, Y + BoardOffset.Y + BoardHeight - 2, Z + BoardOffset.Z );
						break;
					}
					case 3:
					{
						movepoint = new Point3D( X + BoardOffset.X + + BoardWidth - 2, Y + BoardOffset.Y + + BoardHeight - 2, Z + BoardOffset.Z );
						break;
					}
					case 4:
					{
						movepoint = new Point3D( X + BoardOffset.X + BoardWidth / 2, Y + BoardOffset.Y + 1, Z + BoardOffset.Z );
						break;
					}
					case 5:
					{
						movepoint = new Point3D( X + BoardOffset.X + BoardWidth - 2, Y + BoardOffset.Y + BoardHeight / 2, Z + BoardOffset.Z );
						break;
					}
					case 6:
					{
						movepoint = new Point3D( X + BoardOffset.X + BoardWidth / 2, Y + BoardOffset.Y + BoardHeight - 2, Z + BoardOffset.Z );
						break;
					}
					case 7:
					default:
					{
						movepoint = new Point3D( X + BoardOffset.X + 1, Y + BoardOffset.Y + BoardHeight / 2, Z + BoardOffset.Z );
						break;
					}
				}
				
				player.MoveToWorld( movepoint, BoardMap );
				
				
				
				BombBag bag = new BombBag( this, _DefaultMaxBombs, _DefaultBombStrength );
				
				
				BombBags.Add( bag );
				bag.Owner = player;
				player.Backpack.DropItem( bag );
				
				
				
				if( _DefaultDetonatorMode )
				{
					BombDetonator detonator = new BombDetonator( bag );
			
					bag.Detonator = detonator;
					player.Backpack.DropItem( detonator );
				}
				
				
				bag.BaddaBoom = _DefaultBaddaBoom;
				
				
			}
		}
예제 #5
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			
			int version = reader.ReadInt();

			_Owner = reader.ReadMobile();
			MaxBombs = reader.ReadInt();
			BombStrength = reader.ReadInt();
			
			_SpeedUpgraded = reader.ReadBool();
			
			Detonator = (BombDetonator)reader.ReadItem();
			ControlItem = (BombermanControlItem)reader.ReadItem();
			
			int count = reader.ReadInt();
			
			for( int i = 0; i < count; i++ )
			{
				Bombs.Add( (Bomb)reader.ReadItem() );
			}
			
			Active = reader.ReadBool();
		}