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
+3 -4
View File
@@ -24,7 +24,6 @@ using Game.Mails;
using Game.Network.Packets;
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
namespace Game
{
@@ -327,8 +326,8 @@ namespace Game
public void AddAItem(Item it)
{
Contract.Assert(it);
Contract.Assert(!mAitems.ContainsKey(it.GetGUID().GetCounter()));
Cypher.Assert(it);
Cypher.Assert(!mAitems.ContainsKey(it.GetGUID().GetCounter()));
mAitems[it.GetGUID().GetCounter()] = it;
}
@@ -419,7 +418,7 @@ namespace Game
{
public void AddAuction(AuctionEntry auction)
{
Contract.Assert(auction != null);
Cypher.Assert(auction != null);
AuctionsMap[auction.Id] = auction;
Global.ScriptMgr.OnAuctionAdd(this, auction);