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
@@ -19,7 +19,6 @@ using Framework.Constants;
using Game.Entities;
using Game.Network.Packets;
using System;
using System.Diagnostics.Contracts;
namespace Game.Spells
{
@@ -280,7 +279,7 @@ namespace Game.Spells
public void ModSrc(Position pos)
{
Contract.Assert(m_targetMask.HasAnyFlag(SpellCastTargetFlags.SourceLocation));
Cypher.Assert(m_targetMask.HasAnyFlag(SpellCastTargetFlags.SourceLocation));
m_src.Relocate(pos);
}
@@ -331,13 +330,13 @@ namespace Game.Spells
public void ModDst(Position pos)
{
Contract.Assert(m_targetMask.HasAnyFlag(SpellCastTargetFlags.DestLocation));
Cypher.Assert(m_targetMask.HasAnyFlag(SpellCastTargetFlags.DestLocation));
m_dst.Relocate(pos);
}
public void ModDst(SpellDestination spellDest)
{
Contract.Assert(m_targetMask.HasAnyFlag(SpellCastTargetFlags.DestLocation));
Cypher.Assert(m_targetMask.HasAnyFlag(SpellCastTargetFlags.DestLocation));
m_dst = spellDest;
}