diff options
author | jackpoz <giacomopoz@gmail.com> | 2020-06-26 23:28:33 +0200 |
---|---|---|
committer | jackpoz <giacomopoz@gmail.com> | 2020-06-26 23:37:52 +0200 |
commit | 54c701cf0db81c0062e8c5020e07db18984d0ffa (patch) | |
tree | 20ae8c2d51f4868970788417fdda90cb1fb9bc9c | |
parent | 49da3533cd4a0fcd8b2ac7ae0bf4b105f40f8c77 (diff) |
Core/Common: Replace ASSERT(false, "...") with ABORT_MSG("...")
-rw-r--r-- | src/common/Collision/Management/MMapManager.cpp | 2 | ||||
-rw-r--r-- | src/common/Collision/Management/VMapManager2.cpp | 2 | ||||
-rw-r--r-- | src/common/DataStores/DBCFileLoader.cpp | 12 | ||||
-rw-r--r-- | src/server/game/Battlegrounds/BattlegroundScore.h | 2 | ||||
-rw-r--r-- | src/server/game/Combat/ThreatManager.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Conditions/ConditionMgr.cpp | 2 | ||||
-rw-r--r-- | src/server/game/DungeonFinding/LFGMgr.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Globals/ObjectMgr.h | 2 | ||||
-rw-r--r-- | src/server/game/Maps/Map.cpp | 10 | ||||
-rw-r--r-- | src/server/game/Maps/Map.h | 4 | ||||
-rw-r--r-- | src/server/game/Pools/PoolMgr.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 24 | ||||
-rw-r--r-- | src/server/game/Spells/SpellScript.cpp | 2 | ||||
-rw-r--r-- | src/server/shared/DataStores/DBCDatabaseLoader.cpp | 12 |
15 files changed, 41 insertions, 41 deletions
diff --git a/src/common/Collision/Management/MMapManager.cpp b/src/common/Collision/Management/MMapManager.cpp index d983a8b1d8d..31019e2b5c7 100644 --- a/src/common/Collision/Management/MMapManager.cpp +++ b/src/common/Collision/Management/MMapManager.cpp @@ -69,7 +69,7 @@ namespace MMAP if (thread_safe_environment) itr = loadedMMaps.insert(MMapDataSet::value_type(mapId, nullptr)).first; else - ASSERT(false, "Invalid mapId %u passed to MMapManager after startup in thread unsafe environment", mapId); + ABORT_MSG("Invalid mapId %u passed to MMapManager after startup in thread unsafe environment", mapId); } // load and init dtNavMesh - read parameters from file diff --git a/src/common/Collision/Management/VMapManager2.cpp b/src/common/Collision/Management/VMapManager2.cpp index 4a8d55e5664..76ba7e7aeb7 100644 --- a/src/common/Collision/Management/VMapManager2.cpp +++ b/src/common/Collision/Management/VMapManager2.cpp @@ -114,7 +114,7 @@ namespace VMAP if (thread_safe_environment) instanceTree = iInstanceMapTrees.insert(InstanceTreeMap::value_type(mapId, nullptr)).first; else - ASSERT(false, "Invalid mapId %u tile [%u, %u] passed to VMapManager2 after startup in thread unsafe environment", + ABORT_MSG("Invalid mapId %u tile [%u, %u] passed to VMapManager2 after startup in thread unsafe environment", mapId, tileX, tileY); } diff --git a/src/common/DataStores/DBCFileLoader.cpp b/src/common/DataStores/DBCFileLoader.cpp index 466087d2430..842203278fb 100644 --- a/src/common/DataStores/DBCFileLoader.cpp +++ b/src/common/DataStores/DBCFileLoader.cpp @@ -153,10 +153,10 @@ uint32 DBCFileLoader::GetFormatRecordSize(char const* format, int32* index_pos) case FT_NA_BYTE: break; case FT_LOGIC: - ASSERT(false && "Attempted to load DBC files that do not have field types that match what is in the core. Check DBCfmt.h or your DBC files."); + ABORT_MSG("Attempted to load DBC files that do not have field types that match what is in the core. Check DBCfmt.h or your DBC files."); break; default: - ASSERT(false && "Unknown field format character in DBCfmt.h"); + ABORT_MSG("Unknown field format character in DBCfmt.h"); break; } } @@ -243,14 +243,14 @@ char* DBCFileLoader::AutoProduceData(char const* format, uint32& records, char** offset += sizeof(char*); break; case FT_LOGIC: - ASSERT(false && "Attempted to load DBC files that do not have field types that match what is in the core. Check DBCfmt.h or your DBC files."); + ABORT_MSG("Attempted to load DBC files that do not have field types that match what is in the core. Check DBCfmt.h or your DBC files."); break; case FT_NA: case FT_NA_BYTE: case FT_SORT: break; default: - ASSERT(false && "Unknown field format character in DBCfmt.h"); + ABORT_MSG("Unknown field format character in DBCfmt.h"); break; } } @@ -298,14 +298,14 @@ char* DBCFileLoader::AutoProduceStrings(char const* format, char* dataTable) break; } case FT_LOGIC: - ASSERT(false && "Attempted to load DBC files that does not have field types that match what is in the core. Check DBCfmt.h or your DBC files."); + ABORT_MSG("Attempted to load DBC files that does not have field types that match what is in the core. Check DBCfmt.h or your DBC files."); break; case FT_NA: case FT_NA_BYTE: case FT_SORT: break; default: - ASSERT(false && "Unknown field format character in DBCfmt.h"); + ABORT_MSG("Unknown field format character in DBCfmt.h"); break; } } diff --git a/src/server/game/Battlegrounds/BattlegroundScore.h b/src/server/game/Battlegrounds/BattlegroundScore.h index 5f221beaf4c..f4c19320678 100644 --- a/src/server/game/Battlegrounds/BattlegroundScore.h +++ b/src/server/game/Battlegrounds/BattlegroundScore.h @@ -87,7 +87,7 @@ struct BattlegroundScore HealingDone += value; break; default: - ASSERT(false && "Not implemented Battleground score type!"); + ABORT_MSG("Not implemented Battleground score type!"); break; } } diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp index 0743d70fd3c..dfdc24e0b63 100644 --- a/src/server/game/Combat/ThreatManager.cpp +++ b/src/server/game/Combat/ThreatManager.cpp @@ -571,7 +571,7 @@ ThreatReference const* ThreatManager::ReselectVictim() ++it; } // we should have found the old victim at some point in the loop above, so execution should never get to this point - ASSERT(false, "Current victim not found in sorted threat list even though it has a reference - manager desync!"); + ABORT_MSG("Current victim not found in sorted threat list even though it has a reference - manager desync!"); return nullptr; } diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index bfc4f5b1182..0cfa9e9a71d 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -729,7 +729,7 @@ uint32 Condition::GetSearcherTypeMaskForCondition() const mask |= GRID_MAP_TYPE_MASK_PLAYER; break; default: - ASSERT(false && "Condition::GetSearcherTypeMaskForCondition - missing condition handling!"); + ABORT_MSG("Condition::GetSearcherTypeMaskForCondition - missing condition handling!"); break; } return mask; diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index b3882197a6a..7d7dbbbeee2 100644 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -934,7 +934,7 @@ void LFGMgr::MakeNewGroup(LfgProposal const& proposal) dpsPlayers.push_back(guid); break; default: - ASSERT(false, "Invalid LFG role %u", it->second.role); + ABORT_MSG("Invalid LFG role %u", it->second.role); break; } diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 153751d39d0..9a88a8bc782 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -2735,7 +2735,7 @@ void ObjectMgr::OnDeleteSpawnData(SpawnData const* data) _spawnGroupMapStore.erase(it); return; } - ASSERT(false, "Spawn data (%u,%u) being removed is member of spawn group %u, but not actually listed in the lookup table for that group!", uint32(data->type), data->spawnId, data->spawnGroupData->groupId); + ABORT_MSG("Spawn data (%u,%u) being removed is member of spawn group %u, but not actually listed in the lookup table for that group!", uint32(data->type), data->spawnId, data->spawnGroupData->groupId); } void ObjectMgr::AddGameobjectToGrid(ObjectGuid::LowType guid, GameObjectData const* data) diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index f239897ffa2..ca3fa6eab32 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -1343,7 +1343,7 @@ class TC_GAME_API ObjectMgr case SPAWN_TYPE_GAMEOBJECT: return GetGameObjectData(spawnId); default: - ASSERT(false, "Invalid spawn object type %u", uint32(type)); + ABORT_MSG("Invalid spawn object type %u", uint32(type)); return nullptr; } } diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index ced799a9c16..e0378bfb7aa 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2991,7 +2991,7 @@ bool Map::CheckRespawn(RespawnInfo* info) doDelete = true; break; default: - ASSERT(false, "Invalid spawn type %u with spawnId %u on map %u", uint32(info->type), info->spawnId, GetId()); + ABORT_MSG("Invalid spawn type %u with spawnId %u on map %u", uint32(info->type), info->spawnId, GetId()); return true; } if (doDelete) @@ -3026,7 +3026,7 @@ bool Map::CheckRespawn(RespawnInfo* info) else if (info->type == SPAWN_TYPE_CREATURE) sPoolMgr->UpdatePool<Creature>(poolId, info->spawnId); else - ASSERT(false, "Invalid spawn type %u (spawnid %u) on map %u", uint32(info->type), info->spawnId, GetId()); + ABORT_MSG("Invalid spawn type %u (spawnid %u) on map %u", uint32(info->type), info->spawnId, GetId()); info->respawnTime = 0; return false; } @@ -3089,7 +3089,7 @@ bool Map::AddRespawnInfo(RespawnInfo const& info) ASSERT(bySpawnIdMap.find(info.spawnId) == bySpawnIdMap.end(), "Insertion of respawn info with id (%u,%u) into spawn id map failed - state desync.", uint32(info.type), info.spawnId); } else - ASSERT(false, "Invalid respawn info for spawn id (%u,%u) being inserted", uint32(info.type), info.spawnId); + ABORT_MSG("Invalid respawn info for spawn id (%u,%u) being inserted", uint32(info.type), info.spawnId); RespawnInfo * ri = new RespawnInfo(info); ri->handle = _respawnTimes.push(ri); @@ -3184,7 +3184,7 @@ void Map::DoRespawn(SpawnObjectType type, ObjectGuid::LowType spawnId, uint32 gr break; } default: - ASSERT(false, "Invalid spawn type %u (spawnid %u) on map %u", uint32(type), spawnId, GetId()); + ABORT_MSG("Invalid spawn type %u (spawnid %u) on map %u", uint32(type), spawnId, GetId()); } } @@ -3354,7 +3354,7 @@ bool Map::SpawnGroupSpawn(uint32 groupId, bool ignoreRespawn, bool force, std::v break; } default: - ASSERT(false, "Invalid spawn type %u with spawnId %u", uint32(data->type), data->spawnId); + ABORT_MSG("Invalid spawn type %u with spawnId %u", uint32(data->type), data->spawnId); return false; } } diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 215b36caf03..5d5c61bb80b 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -850,7 +850,7 @@ class TC_GAME_API Map : public GridRefManager<NGridType> switch (type) { default: - ASSERT(false); + ABORT(); case SPAWN_TYPE_CREATURE: return _creatureRespawnTimesBySpawnId; case SPAWN_TYPE_GAMEOBJECT: @@ -862,7 +862,7 @@ class TC_GAME_API Map : public GridRefManager<NGridType> switch (type) { default: - ASSERT(false); + ABORT(); case SPAWN_TYPE_CREATURE: return _creatureRespawnTimesBySpawnId; case SPAWN_TYPE_GAMEOBJECT: diff --git a/src/server/game/Pools/PoolMgr.cpp b/src/server/game/Pools/PoolMgr.cpp index feea70c4021..951366be0a5 100644 --- a/src/server/game/Pools/PoolMgr.cpp +++ b/src/server/game/Pools/PoolMgr.cpp @@ -804,7 +804,7 @@ uint32 PoolMgr::IsPartOfAPool(SpawnObjectType type, ObjectGuid::LowType spawnId) case SPAWN_TYPE_GAMEOBJECT: return IsPartOfAPool<GameObject>(spawnId); default: - ASSERT(false, "Invalid spawn type %u passed to PoolMgr::IsPartOfPool (with spawnId %u)", uint32(type), spawnId); + ABORT_MSG("Invalid spawn type %u passed to PoolMgr::IsPartOfPool (with spawnId %u)", uint32(type), spawnId); return 0; } } diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 4c090b032d6..2675a8ae62c 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -919,7 +919,7 @@ void Spell::SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTar m_targets.SetSrc(*m_caster); break; default: - ASSERT(false && "Spell::SelectEffectImplicitTargets: received not implemented select target reference type for TARGET_TYPE_OBJECT_SRC"); + ABORT_MSG("Spell::SelectEffectImplicitTargets: received not implemented select target reference type for TARGET_TYPE_OBJECT_SRC"); break; } break; @@ -936,7 +936,7 @@ void Spell::SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTar SelectImplicitDestDestTargets(effIndex, targetType); break; default: - ASSERT(false && "Spell::SelectEffectImplicitTargets: received not implemented select target reference type for TARGET_TYPE_OBJECT_DEST"); + ABORT_MSG("Spell::SelectEffectImplicitTargets: received not implemented select target reference type for TARGET_TYPE_OBJECT_DEST"); break; } break; @@ -950,7 +950,7 @@ void Spell::SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTar SelectImplicitTargetObjectTargets(effIndex, targetType); break; default: - ASSERT(false && "Spell::SelectEffectImplicitTargets: received not implemented select target reference type for TARGET_TYPE_OBJECT"); + ABORT_MSG("Spell::SelectEffectImplicitTargets: received not implemented select target reference type for TARGET_TYPE_OBJECT"); break; } break; @@ -960,7 +960,7 @@ void Spell::SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTar TC_LOG_DEBUG("spells", "SPELL: target type %u, found in spellID %u, effect %u is not implemented yet!", m_spellInfo->Id, effIndex, targetType.GetTarget()); break; default: - ASSERT(false && "Spell::SelectEffectImplicitTargets: received not implemented select target category"); + ABORT_MSG("Spell::SelectEffectImplicitTargets: received not implemented select target category"); break; } } @@ -969,7 +969,7 @@ void Spell::SelectImplicitChannelTargets(SpellEffIndex effIndex, SpellImplicitTa { if (targetType.GetReferenceType() != TARGET_REFERENCE_TYPE_CASTER) { - ASSERT(false && "Spell::SelectImplicitChannelTargets: received not implemented target reference type"); + ABORT_MSG("Spell::SelectImplicitChannelTargets: received not implemented target reference type"); return; } @@ -1016,7 +1016,7 @@ void Spell::SelectImplicitChannelTargets(SpellEffIndex effIndex, SpellImplicitTa break; } default: - ASSERT(false && "Spell::SelectImplicitChannelTargets: received not implemented target type"); + ABORT_MSG("Spell::SelectImplicitChannelTargets: received not implemented target type"); break; } } @@ -1025,7 +1025,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar { if (targetType.GetReferenceType() != TARGET_REFERENCE_TYPE_CASTER) { - ASSERT(false && "Spell::SelectImplicitNearbyTargets: received not implemented target reference type"); + ABORT_MSG("Spell::SelectImplicitNearbyTargets: received not implemented target reference type"); return; } @@ -1046,7 +1046,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar range = m_spellInfo->GetMaxRange(IsPositive(), m_caster, this); break; default: - ASSERT(false && "Spell::SelectImplicitNearbyTargets: received not implemented selection check type"); + ABORT_MSG("Spell::SelectImplicitNearbyTargets: received not implemented selection check type"); break; } @@ -1143,7 +1143,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar break; } default: - ASSERT(false && "Spell::SelectImplicitNearbyTargets: received not implemented target object type"); + ABORT_MSG("Spell::SelectImplicitNearbyTargets: received not implemented target object type"); break; } @@ -1154,7 +1154,7 @@ void Spell::SelectImplicitConeTargets(SpellEffIndex effIndex, SpellImplicitTarge { if (targetType.GetReferenceType() != TARGET_REFERENCE_TYPE_CASTER) { - ASSERT(false && "Spell::SelectImplicitConeTargets: received not implemented target reference type"); + ABORT_MSG("Spell::SelectImplicitConeTargets: received not implemented target reference type"); return; } std::list<WorldObject*> targets; @@ -1226,7 +1226,7 @@ void Spell::SelectImplicitAreaTargets(SpellEffIndex effIndex, SpellImplicitTarge break; } default: - ASSERT(false && "Spell::SelectImplicitAreaTargets: received not implemented target reference type"); + ABORT_MSG("Spell::SelectImplicitAreaTargets: received not implemented target reference type"); return; } if (!referer) @@ -1247,7 +1247,7 @@ void Spell::SelectImplicitAreaTargets(SpellEffIndex effIndex, SpellImplicitTarge center = referer; break; default: - ASSERT(false && "Spell::SelectImplicitAreaTargets: received not implemented target reference type"); + ABORT_MSG("Spell::SelectImplicitAreaTargets: received not implemented target reference type"); return; } std::list<WorldObject*> targets; diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index b2257796b9b..23b858502b4 100644 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -1030,7 +1030,7 @@ bool AuraScript::_IsDefaultActionPrevented() case AURA_SCRIPT_HOOK_EFFECT_PROC: return m_defaultActionPrevented; default: - ASSERT(false && "AuraScript::_IsDefaultActionPrevented is called in a wrong place"); + ABORT_MSG("AuraScript::_IsDefaultActionPrevented is called in a wrong place"); return false; } } diff --git a/src/server/shared/DataStores/DBCDatabaseLoader.cpp b/src/server/shared/DataStores/DBCDatabaseLoader.cpp index be57d76dc59..dda81a839fe 100644 --- a/src/server/shared/DataStores/DBCDatabaseLoader.cpp +++ b/src/server/shared/DataStores/DBCDatabaseLoader.cpp @@ -43,7 +43,7 @@ DBCDatabaseLoader::DBCDatabaseLoader(char const* tableName, char const* dbFormat case FT_SQL_ABSENT: break; default: - ASSERT(false, "Invalid DB format string for '%s'", tableName); + ABORT_MSG("Invalid DB format string for '%s'", tableName); break; } --uIndexPos; @@ -66,7 +66,7 @@ char* DBCDatabaseLoader::Load(uint32& records, char**& indexTable) // Check if sql index pos is valid if (int32(result->GetFieldCount() - 1) < _sqlIndexPos) { - ASSERT(false, "Invalid index pos for dbc: '%s'", _sqlTableName); + ABORT_MSG("Invalid index pos for dbc: '%s'", _sqlTableName); return nullptr; } @@ -102,7 +102,7 @@ char* DBCDatabaseLoader::Load(uint32& records, char**& indexTable) else { // Attempt to overwrite existing data - ASSERT(false, "Index %d already exists in dbc:'%s'", indexValue, _sqlTableName); + ABORT_MSG("Index %d already exists in dbc:'%s'", indexValue, _sqlTableName); return nullptr; } @@ -114,7 +114,7 @@ char* DBCDatabaseLoader::Load(uint32& records, char**& indexTable) { if (!*dbcFormat || !*sqlFormat) { - ASSERT(false, "DB and DBC format strings do not have the same length for '%s'", _sqlTableName); + ABORT_MSG("DB and DBC format strings do not have the same length for '%s'", _sqlTableName); return nullptr; } if (!*dbcFormat) @@ -144,7 +144,7 @@ char* DBCDatabaseLoader::Load(uint32& records, char**& indexTable) case FT_SORT: break; default: - ASSERT(false, "Unsupported data type '%c' marked present in table '%s'", *dbcFormat, _sqlTableName); + ABORT_MSG("Unsupported data type '%c' marked present in table '%s'", *dbcFormat, _sqlTableName); return nullptr; } ++sqlColumnNumber; @@ -172,7 +172,7 @@ char* DBCDatabaseLoader::Load(uint32& records, char**& indexTable) } break; default: - ASSERT(false, "Invalid DB format string for '%s'", _sqlTableName); + ABORT_MSG("Invalid DB format string for '%s'", _sqlTableName); return nullptr; } } |