aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2020-06-26 23:28:33 +0200
committerShauren <shauren.trinity@gmail.com>2022-01-19 22:17:42 +0100
commit68faf5bc4bc69a111eca479860215f075adcdad6 (patch)
tree051926e05d7750b5fb3bd9b4c7afc0d243aed501 /src/server
parentf7c1ae01f83449348ba1cd275188e895f00e3422 (diff)
Core/Common: Replace ASSERT(false, "...") with ABORT_MSG("...")
(cherry picked from commit 54c701cf0db81c0062e8c5020e07db18984d0ffa)
Diffstat (limited to 'src/server')
-rw-r--r--src/server/game/Battlegrounds/BattlegroundScore.cpp2
-rw-r--r--src/server/game/Combat/ThreatManager.cpp2
-rw-r--r--src/server/game/Conditions/ConditionMgr.cpp2
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.cpp2
-rw-r--r--src/server/game/Entities/Player/Player.cpp2
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp2
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp4
-rw-r--r--src/server/game/Maps/Map.cpp10
-rw-r--r--src/server/game/Maps/Map.h4
-rw-r--r--src/server/game/Pools/PoolMgr.cpp2
-rw-r--r--src/server/game/Spells/Spell.cpp24
-rw-r--r--src/server/game/Spells/SpellScript.cpp2
-rw-r--r--src/server/shared/DataStores/DB2DatabaseLoader.cpp4
13 files changed, 31 insertions, 31 deletions
diff --git a/src/server/game/Battlegrounds/BattlegroundScore.cpp b/src/server/game/Battlegrounds/BattlegroundScore.cpp
index a3ec2f196af..d030e2f6e95 100644
--- a/src/server/game/Battlegrounds/BattlegroundScore.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundScore.cpp
@@ -51,7 +51,7 @@ void BattlegroundScore::UpdateScore(uint32 type, uint32 value)
HealingDone += value;
break;
default:
- ASSERT(false, "Not implemented Battleground score type %u!", type);
+ ABORT_MSG("Not implemented Battleground score type %u!", type);
break;
}
}
diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp
index 96e7b88f0bb..85baee76892 100644
--- a/src/server/game/Combat/ThreatManager.cpp
+++ b/src/server/game/Combat/ThreatManager.cpp
@@ -579,7 +579,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 cba55f5e126..490881071ec 100644
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -766,7 +766,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 0bb2c62d2b6..910ebd630fb 100644
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -956,7 +956,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/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 0de3ae76890..2894b263137 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -17096,7 +17096,7 @@ void Player::UpdateQuestObjectiveProgress(QuestObjectiveType objectiveType, int3
objectiveIsNowComplete = IsQuestObjectiveProgressBarComplete(logSlot, quest);
break;
default:
- ASSERT(false, "Unhandled quest objective type %u", uint32(objectiveType));
+ ABORT_MSG("Unhandled quest objective type %u", uint32(objectiveType));
break;
}
}
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 4ba9ff12efd..a9434f21e21 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -8701,7 +8701,7 @@ void Unit::UpdateUnitMod(UnitMods unitMod)
case UNIT_MOD_DAMAGE_RANGED: UpdateDamagePhysical(RANGED_ATTACK); break;
default:
- ASSERT(false, "Not implemented UnitMod %u", unitMod);
+ ABORT_MSG("Not implemented UnitMod %u", unitMod);
break;
}
}
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index f323a40dcaf..a3148067269 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -2904,7 +2904,7 @@ SpawnData const* ObjectMgr::GetSpawnData(SpawnObjectType type, ObjectGuid::LowTy
case SPAWN_TYPE_AREATRIGGER:
return sAreaTriggerDataStore->GetAreaTriggerSpawn(spawnId);
default:
- ASSERT(false, "Invalid spawn object type %u", uint32(type));
+ ABORT_MSG("Invalid spawn object type %u", uint32(type));
return nullptr;
}
}
@@ -2924,7 +2924,7 @@ void ObjectMgr::OnDeleteSpawnData(SpawnData const* data)
_spawnGroupMapStore.erase(it);
return;
}
- ASSERT(false, "Spawn data (%u," UI64FMTD ") 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," UI64FMTD ") 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(GameObjectData const* data)
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index d3d32e55846..ce111ce2b81 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -3176,7 +3176,7 @@ bool Map::CheckRespawn(RespawnInfo* info)
doDelete = true;
break;
default:
- ASSERT(false, "Invalid spawn type %u with spawnId " UI64FMTD " on map %u", uint32(info->type), info->spawnId, GetId());
+ ABORT_MSG("Invalid spawn type %u with spawnId " UI64FMTD " on map %u", uint32(info->type), info->spawnId, GetId());
return true;
}
if (doDelete)
@@ -3213,7 +3213,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 " UI64FMTD ") on map %u", uint32(info->type), info->spawnId, GetId());
+ ABORT_MSG("Invalid spawn type %u (spawnid " UI64FMTD ") on map %u", uint32(info->type), info->spawnId, GetId());
info->respawnTime = 0;
return false;
}
@@ -3278,7 +3278,7 @@ bool Map::AddRespawnInfo(RespawnInfo const& info)
ASSERT(bySpawnIdMap->find(info.spawnId) == bySpawnIdMap->end(), "Insertion of respawn info with id (%u," UI64FMTD ") into spawn id map failed - state desync.", uint32(info.type), info.spawnId);
}
else
- ASSERT(false, "Invalid respawn info for spawn id (%u," UI64FMTD ") being inserted", uint32(info.type), info.spawnId);
+ ABORT_MSG("Invalid respawn info for spawn id (%u," UI64FMTD ") being inserted", uint32(info.type), info.spawnId);
RespawnInfo * ri = new RespawnInfo(info);
ri->handle = _respawnTimes.push(ri);
@@ -3378,7 +3378,7 @@ void Map::DoRespawn(SpawnObjectType type, ObjectGuid::LowType spawnId, uint32 gr
break;
}
default:
- ASSERT(false, "Invalid spawn type %u (spawnid " UI64FMTD ") on map %u", uint32(type), spawnId, GetId());
+ ABORT_MSG("Invalid spawn type %u (spawnid " UI64FMTD ") on map %u", uint32(type), spawnId, GetId());
}
}
@@ -3560,7 +3560,7 @@ bool Map::SpawnGroupSpawn(uint32 groupId, bool ignoreRespawn, bool force, std::v
break;
}
default:
- ASSERT(false, "Invalid spawn type %u with spawnId " UI64FMTD, uint32(data->type), data->spawnId);
+ ABORT_MSG("Invalid spawn type %u with spawnId " UI64FMTD, uint32(data->type), data->spawnId);
return false;
}
}
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h
index 48e8c49a4a9..80080876d02 100644
--- a/src/server/game/Maps/Map.h
+++ b/src/server/game/Maps/Map.h
@@ -832,7 +832,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:
@@ -846,7 +846,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 bb5c9dfcc69..54f9cc3a464 100644
--- a/src/server/game/Pools/PoolMgr.cpp
+++ b/src/server/game/Pools/PoolMgr.cpp
@@ -802,7 +802,7 @@ uint32 PoolMgr::IsPartOfAPool(SpawnObjectType type, ObjectGuid::LowType spawnId)
case SPAWN_TYPE_AREATRIGGER:
return 0;
default:
- ASSERT(false, "Invalid spawn type %u passed to PoolMgr::IsPartOfPool (with spawnId " UI64FMTD ")", uint32(type), spawnId);
+ ABORT_MSG("Invalid spawn type %u passed to PoolMgr::IsPartOfPool (with spawnId " UI64FMTD ")", uint32(type), spawnId);
return 0;
}
}
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index fa5f19f1ff5..9e1158407f0 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -902,7 +902,7 @@ void Spell::SelectEffectImplicitTargets(SpellEffectInfo const& spellEffectInfo,
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;
@@ -919,7 +919,7 @@ void Spell::SelectEffectImplicitTargets(SpellEffectInfo const& spellEffectInfo,
SelectImplicitDestDestTargets(spellEffectInfo, 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;
@@ -933,7 +933,7 @@ void Spell::SelectEffectImplicitTargets(SpellEffectInfo const& spellEffectInfo,
SelectImplicitTargetObjectTargets(spellEffectInfo, 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;
@@ -943,7 +943,7 @@ void Spell::SelectEffectImplicitTargets(SpellEffectInfo const& spellEffectInfo,
TC_LOG_DEBUG("spells", "SPELL: target type %u, found in spellID %u, effect %u is not implemented yet!", m_spellInfo->Id, uint32(spellEffectInfo.EffectIndex), 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;
}
}
@@ -952,7 +952,7 @@ void Spell::SelectImplicitChannelTargets(SpellEffectInfo const& spellEffectInfo,
{
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;
}
@@ -1008,7 +1008,7 @@ void Spell::SelectImplicitChannelTargets(SpellEffectInfo const& spellEffectInfo,
break;
}
default:
- ASSERT(false && "Spell::SelectImplicitChannelTargets: received not implemented target type");
+ ABORT_MSG("Spell::SelectImplicitChannelTargets: received not implemented target type");
break;
}
}
@@ -1017,7 +1017,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffectInfo const& spellEffectInfo,
{
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;
}
@@ -1038,7 +1038,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffectInfo const& spellEffectInfo,
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;
}
@@ -1135,7 +1135,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffectInfo const& spellEffectInfo,
break;
}
default:
- ASSERT(false && "Spell::SelectImplicitNearbyTargets: received not implemented target object type");
+ ABORT_MSG("Spell::SelectImplicitNearbyTargets: received not implemented target object type");
break;
}
@@ -1228,7 +1228,7 @@ void Spell::SelectImplicitAreaTargets(SpellEffectInfo const& spellEffectInfo, Sp
break;
}
default:
- ASSERT(false && "Spell::SelectImplicitAreaTargets: received not implemented target reference type");
+ ABORT_MSG("Spell::SelectImplicitAreaTargets: received not implemented target reference type");
return;
}
@@ -1250,7 +1250,7 @@ void Spell::SelectImplicitAreaTargets(SpellEffectInfo const& spellEffectInfo, Sp
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;
}
@@ -1784,7 +1784,7 @@ void Spell::SelectImplicitLineTargets(SpellEffectInfo const& spellEffectInfo, Sp
dst = m_targets.GetUnitTarget();
break;
default:
- ASSERT(false, "Spell::SelectImplicitLineTargets: received not implemented target reference type");
+ ABORT_MSG("Spell::SelectImplicitLineTargets: received not implemented target reference type");
return;
}
diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp
index 60b25458bf3..2941b1400e6 100644
--- a/src/server/game/Spells/SpellScript.cpp
+++ b/src/server/game/Spells/SpellScript.cpp
@@ -1125,7 +1125,7 @@ bool AuraScript::_IsDefaultActionPrevented() const
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/DB2DatabaseLoader.cpp b/src/server/shared/DataStores/DB2DatabaseLoader.cpp
index a94b1e7c00b..547fec40e37 100644
--- a/src/server/shared/DataStores/DB2DatabaseLoader.cpp
+++ b/src/server/shared/DataStores/DB2DatabaseLoader.cpp
@@ -167,7 +167,7 @@ char* DB2DatabaseLoader::Load(bool custom, uint32& records, char**& indexTable,
break;
}
default:
- ASSERT(false, "Unknown format character '%c' found in %s meta for field %s",
+ ABORT_MSG("Unknown format character '%c' found in %s meta for field %s",
_loadInfo->TypesString[f], _storageName.c_str(), _loadInfo->Fields[f].Name);
break;
}
@@ -274,7 +274,7 @@ void DB2DatabaseLoader::LoadStrings(bool custom, LocaleConstant locale, uint32 r
offset += sizeof(char*);
break;
default:
- ASSERT(false, "Unknown format character '%c' found in %s meta for field %s",
+ ABORT_MSG("Unknown format character '%c' found in %s meta for field %s",
_loadInfo->TypesString[fieldIndex], _storageName.c_str(), _loadInfo->Fields[fieldIndex].Name);
break;
}