mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 10:55:43 +00:00
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:
@@ -4052,7 +4052,7 @@ void Unit::_UnapplyAura(AuraApplication * aurApp, AuraRemoveMode removeMode)
|
||||
else
|
||||
++iter;
|
||||
}
|
||||
ASSERT(false);
|
||||
ABORT();
|
||||
}
|
||||
|
||||
void Unit::_RemoveNoStackAurasDueToAura(Aura* aura)
|
||||
@@ -4145,7 +4145,7 @@ void Unit::RemoveOwnedAura(Aura* aura, AuraRemoveMode removeMode)
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT(false);
|
||||
ABORT();
|
||||
}
|
||||
|
||||
Aura* Unit::GetOwnedAura(uint32 spellId, uint64 casterGUID, uint64 itemCasterGUID, uint8 reqEffMask, Aura* except) const
|
||||
@@ -9895,7 +9895,7 @@ void Unit::SetMinion(Minion *minion, bool apply)
|
||||
{
|
||||
OutDebugInfo();
|
||||
(*itr)->OutDebugInfo();
|
||||
ASSERT(false);
|
||||
ABORT();
|
||||
}
|
||||
ASSERT((*itr)->GetTypeId() == TYPEID_UNIT);
|
||||
|
||||
@@ -14377,7 +14377,7 @@ void Unit::RemoveFromWorld()
|
||||
if (GetCharmerGUID())
|
||||
{
|
||||
sLog->outCrash("Unit %u has charmer guid when removed from world", GetEntry());
|
||||
ASSERT(false);
|
||||
ABORT();
|
||||
}
|
||||
|
||||
if (Unit* owner = GetOwner())
|
||||
@@ -14387,7 +14387,7 @@ void Unit::RemoveFromWorld()
|
||||
if (HasUnitTypeMask(UNIT_MASK_MINION|UNIT_MASK_GUARDIAN))
|
||||
owner->SetMinion((Minion*)this, false);
|
||||
sLog->outString("Unit %u is in controlled list of %u when removed from world", GetEntry(), owner->GetEntry());
|
||||
//ASSERT(false);
|
||||
//ABORT();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17151,7 +17151,7 @@ void Unit::RemoveCharmedBy(Unit* charmer)
|
||||
{
|
||||
// sLog->outCrash("Unit::RemoveCharmedBy: this: " UI64FMTD " true charmer: " UI64FMTD " false charmer: " UI64FMTD,
|
||||
// GetGUID(), GetCharmerGUID(), charmer->GetGUID());
|
||||
// ASSERT(false);
|
||||
// ABORT();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -18260,7 +18260,7 @@ void Unit::ChangeSeat(int8 seatId, bool next)
|
||||
|
||||
m_vehicle->RemovePassenger(this);
|
||||
if (!m_vehicle->AddPassenger(this, seatId))
|
||||
ASSERT(false);
|
||||
ABORT();
|
||||
}
|
||||
|
||||
void Unit::ExitVehicle(Position const* /*exitPosition*/)
|
||||
|
||||
Reference in New Issue
Block a user