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 ); } }
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); } } }