From d92537fd87dd61a72ebcf2927a1e1a4f7d53f117 Mon Sep 17 00:00:00 2001 From: Zack Date: Tue, 27 Dec 2011 09:40:45 -0500 Subject: [PATCH] Moved the else from Midas' commit that reset the groups allowed in the event of an error, we can just ignore it instead of resetting. Move initialization of the list to the constructor. --- TShockAPI/DB/RegionManager.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/TShockAPI/DB/RegionManager.cs b/TShockAPI/DB/RegionManager.cs index ad3ea38c..44bcdb91 100644 --- a/TShockAPI/DB/RegionManager.cs +++ b/TShockAPI/DB/RegionManager.cs @@ -618,6 +618,7 @@ namespace TShockAPI.DB DisableBuild = true; WorldID = string.Empty; AllowedIDs = new List(); + AllowedGroups = new List(); } public bool InArea(Rectangle point) @@ -662,8 +663,8 @@ namespace TShockAPI.DB AllowedIDs = id_list; } - public void SetAllowedGroups( String groups ) - { + public void SetAllowedGroups( String groups ) + { // prevent null pointer exceptions if (!string.IsNullOrEmpty(groups)) { @@ -674,11 +675,7 @@ namespace TShockAPI.DB AllowedGroups = groupArr; } - else - { - AllowedGroups = new List(); - } - } + } public void RemoveID(int id) {