示例#1
0
		public override void OnDestroyed( WoodenBox lootbox )
		{
			Item book;

			if( Utility.RandomBool( ) )
			{
				book = new BlueBook( );
			}
			else
			{
				book = new BrownBook( );
			}

			if( book != null || !book.Deleted )
				lootbox.DropItem( book );

			if( Utility.RandomDouble( ) < 0.25 )
			{
				Item loot;

				if( Utility.RandomBool( ) )
				{
					loot = new ScribesPen( );
				}
				else
				{
					loot = new MapmakersPen( );
				}

				if( loot != null || !loot.Deleted )
					lootbox.DropItem( loot );
			}
		}
示例#2
0
        public override void OnDestroyed(WoodenBox lootbox)
        {
            Item book;

            if (Utility.RandomBool( ))
            {
                book = new BlueBook( );
            }
            else
            {
                book = new BrownBook( );
            }

            if (book != null || !book.Deleted)
            {
                lootbox.DropItem(book);
            }

            if (Utility.RandomDouble( ) < 0.25)
            {
                Item loot;

                if (Utility.RandomBool( ))
                {
                    loot = new ScribesPen( );
                }
                else
                {
                    loot = new MapmakersPen( );
                }

                if (loot != null || !loot.Deleted)
                {
                    lootbox.DropItem(loot);
                }
            }
        }