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.

This commit is contained in:
Zack 2011-12-27 09:40:45 -05:00
parent 77af896427
commit d92537fd87

View file

@ -618,6 +618,7 @@ namespace TShockAPI.DB
DisableBuild = true;
WorldID = string.Empty;
AllowedIDs = new List<int>();
AllowedGroups = new List<string>();
}
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<string>();
}
}
}
public void RemoveID(int id)
{