feat(Core): Added ABORT() macro to prevent the usage of ASSERT(false) as a quick hack to crash the core misusing assert (#2273)

This commit is contained in:
Viste
2019-09-26 10:51:34 +03:00
committed by Stoabrogga
parent 58f3cfe387
commit 854b426978
28 changed files with 127 additions and 74 deletions

View File

@@ -182,13 +182,13 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave* save,
if (!entry)
{
sLog->outError("CreateInstance: no entry for map %d", GetId());
ASSERT(false);
ABORT();
}
const InstanceTemplate* iTemplate = sObjectMgr->GetInstanceTemplate(GetId());
if (!iTemplate)
{
sLog->outError("CreateInstance: no instance template for map %d", GetId());
ASSERT(false);
ABORT();
}
// some instances only have one difficulty
@@ -272,6 +272,6 @@ bool MapInstanced::DestroyInstance(InstancedMaps::iterator &itr)
bool MapInstanced::CanEnter(Player* /*player*/, bool /*loginCheck*/)
{
//ASSERT(false);
//ABORT();
return true;
}