diff --git a/fCraft/Commands/BuildingCommands.cs b/fCraft/Commands/BuildingCommands.cs index 3e74fe5..c0d8b01 100644 --- a/fCraft/Commands/BuildingCommands.cs +++ b/fCraft/Commands/BuildingCommands.cs @@ -169,7 +169,7 @@ DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY private static void Door( Player player, Command cmd ) { string option = cmd.Next(); - if ( option == null ) { + if ( string.IsNullOrEmpty(option) ) { int MaxNumberOfDoorsPerPlayer = 5; if ( DoorHandler.GetPlayerOwnedDoorsNumber( player.World, player ) >= MaxNumberOfDoorsPerPlayer ) { player.Message( "You cannot place any more doors, a player can have a maximum of {0} doors per world", diff --git a/fCraft/Doors/DoorHandler.cs b/fCraft/Doors/DoorHandler.cs index 6586e92..b399d5d 100644 --- a/fCraft/Doors/DoorHandler.cs +++ b/fCraft/Doors/DoorHandler.cs @@ -121,9 +121,11 @@ public Vector3I[] GetAffectedBlocks( Door door ) { public static int GetPlayerOwnedDoorsNumber( World world, Player player ) { int Number = 0; - foreach ( Door door in world.Map.Doors ) { - if ( door.Creator == player.Name ) { - Number++; + if ( world.Map.Doors != null ) { + foreach ( Door door in world.Map.Doors ) { + if ( door.Creator == player.Name ) { + Number++; + } } } return Number; diff --git a/fCraft/Utils/Updater.cs b/fCraft/Utils/Updater.cs index 6cd18d0..32fb26a 100644 --- a/fCraft/Utils/Updater.cs +++ b/fCraft/Utils/Updater.cs @@ -18,9 +18,9 @@ namespace fCraft { public static class Updater { public static readonly ReleaseInfo CurrentRelease = new ReleaseInfo( - 306, - 24, - new DateTime( 2013, 05, 14, 1, 0, 0, DateTimeKind.Utc ), + 307, + 132, + new DateTime( 2013, 08, 14, 1, 0, 0, DateTimeKind.Utc ), "", "", ReleaseFlags.Bugfix #if DEBUG @@ -32,7 +32,7 @@ public static string UserAgent { get { return "800Craft " + CurrentRelease.VersionString; } } - public const string LatestStable = "0.306_r27"; + public const string LatestStable = "0.307_r132"; public static string UpdateUrl { get; set; } @@ -50,7 +50,7 @@ static Updater() { public static bool UpdateCheck() { try { using ( WebClient client = new WebClient() ) { - using ( Stream stream = client.OpenRead( "http://forums.au70.net/public/update.txt" ) ) { + using ( Stream stream = client.OpenRead( "http://au70.net/public/update.txt" ) ) { stream.ReadTimeout = 1000; using ( StreamReader reader = new StreamReader( stream ) ) { string s = reader.ReadLine();