Core/Errors: Stop using System.Diagnostics.Contracts, Its just closing the server without error or warning. We now log the error and then throw a exception

This commit is contained in:
hondacrx
2018-06-15 12:34:56 -04:00
parent 1289bc3ed1
commit 7aa494d5dd
86 changed files with 520 additions and 558 deletions
+2 -3
View File
@@ -21,7 +21,6 @@ using Game.Groups;
using Game.Maps;
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
namespace Game.Entities
@@ -60,7 +59,7 @@ namespace Game.Entities
if (map == null)
{
var entry = CliDB.MapStorage.LookupByKey(id);
Contract.Assert(entry != null);
Cypher.Assert(entry != null);
if (entry.ParentMapID != -1)
{
CreateBaseMap((uint)entry.ParentMapID);
@@ -73,7 +72,7 @@ namespace Game.Entities
lock(_mapsLock)
map = CreateBaseMap_i(entry);
}
Contract.Assert(map != null);
Cypher.Assert(map != null);
return map;
}