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

This commit is contained in:
StormBytePP committed 2015-09-21 15:11:06 +02:00
1 parent ff71da2b05
commit 7b245a0b6b
23 files changed
+62 -55

No files matched your search

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