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
@@ -20,7 +20,6 @@ using Game.Entities;
using Game.Groups;
using Game.Network;
using Game.Network.Packets;
using System.Diagnostics.Contracts;
namespace Game
{
@@ -204,7 +203,7 @@ namespace Game
}
// If we're about to create a group there really should be a leader present
Contract.Assert(leader);
Cypher.Assert(leader);
group.RemoveInvite(leader);
group.Create(leader);
Global.GroupMgr.AddGroup(group);
@@ -253,7 +252,7 @@ namespace Game
Group grp = GetPlayer().GetGroup();
// grp is checked already above in CanUninviteFromGroup()
Contract.Assert(grp);
Cypher.Assert(grp);
if (grp.IsMember(packet.TargetGUID))
{