chore(Core/Misc): add LOG_ERROR where there was commented ASSERT (#6761)
This commit is contained in:
@@ -17761,12 +17761,17 @@ void Player::_LoadArenaTeamInfo()
|
|||||||
if (uint32 arenaTeamId = Player::GetArenaTeamIdFromStorage(GetGUID().GetCounter(), itr.second))
|
if (uint32 arenaTeamId = Player::GetArenaTeamIdFromStorage(GetGUID().GetCounter(), itr.second))
|
||||||
{
|
{
|
||||||
ArenaTeam* arenaTeam = sArenaTeamMgr->GetArenaTeamById(arenaTeamId);
|
ArenaTeam* arenaTeam = sArenaTeamMgr->GetArenaTeamById(arenaTeamId);
|
||||||
if (!arenaTeam) // some shit, should be assert, but just ignore
|
if (!arenaTeam)
|
||||||
|
{
|
||||||
|
LOG_ERROR("bg.arena", "Player::_LoadArenaTeamInfo: No arena team was found.");
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
ArenaTeamMember const* member = arenaTeam->GetMember(GetGUID());
|
ArenaTeamMember const* member = arenaTeam->GetMember(GetGUID());
|
||||||
if (!member) // some shit, should be assert, but just ignore
|
if (!member)
|
||||||
|
{
|
||||||
|
LOG_ERROR("bg.arena", "Player::_LoadArenaTeamInfo: No members in the arena team (%u) was found.", arenaTeamId);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
uint8 slot = itr.second;
|
uint8 slot = itr.second;
|
||||||
|
|
||||||
SetArenaTeamInfoField(slot, ARENA_TEAM_ID, arenaTeamId);
|
SetArenaTeamInfoField(slot, ARENA_TEAM_ID, arenaTeamId);
|
||||||
|
|||||||
@@ -731,7 +731,17 @@ bool StaticTransport::Create(ObjectGuid::LowType guidlow, uint32 name_id, Map* m
|
|||||||
SetGoAnimProgress(animprogress);
|
SetGoAnimProgress(animprogress);
|
||||||
m_goValue.Transport.AnimationInfo = sTransportMgr->GetTransportAnimInfo(goinfo->entry);
|
m_goValue.Transport.AnimationInfo = sTransportMgr->GetTransportAnimInfo(goinfo->entry);
|
||||||
//ASSERT(m_goValue.Transport.AnimationInfo);
|
//ASSERT(m_goValue.Transport.AnimationInfo);
|
||||||
|
if (!m_goValue.Transport.AnimationInfo)
|
||||||
|
{
|
||||||
|
LOG_ERROR("vehicle", "StaticTransport::Create: No AnimationInfo was found for GameObject entry (%u)", goinfo->entry);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
//ASSERT(m_goValue.Transport.AnimationInfo->TotalTime > 0);
|
//ASSERT(m_goValue.Transport.AnimationInfo->TotalTime > 0);
|
||||||
|
if (!m_goValue.Transport.AnimationInfo->TotalTime)
|
||||||
|
{
|
||||||
|
LOG_ERROR("vehicle", "StaticTransport::Create: AnimationInfo->TotalTime is 0 for GameObject entry (%u)", goinfo->entry);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
SetPauseTime(goinfo->transport.pauseAtTime);
|
SetPauseTime(goinfo->transport.pauseAtTime);
|
||||||
if (goinfo->transport.startOpen && goinfo->transport.pauseAtTime)
|
if (goinfo->transport.startOpen && goinfo->transport.pauseAtTime)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -441,7 +441,11 @@ void Vehicle::RemovePassenger(Unit* unit)
|
|||||||
// but the unit is not on the vehicles seat yet, thus crashing at ASSERT(seat != Seats.end());
|
// but the unit is not on the vehicles seat yet, thus crashing at ASSERT(seat != Seats.end());
|
||||||
// ASSERT(seat != Seats.end());
|
// ASSERT(seat != Seats.end());
|
||||||
if (seat == Seats.end())
|
if (seat == Seats.end())
|
||||||
|
{
|
||||||
|
LOG_ERROR("vehicles", "Vehicle::RemovePassenger: Vehicle entry (%u) id (%u) is dissmised and removed all existing passangers, but the unit (%s) was not on the vehicle!",
|
||||||
|
_me->GetEntry(), _vehicleInfo->m_ID, unit->GetName().c_str());
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
LOG_DEBUG("vehicles", "Unit %s exit vehicle entry %u id %u (%s) seat %d",
|
LOG_DEBUG("vehicles", "Unit %s exit vehicle entry %u id %u (%s) seat %d",
|
||||||
unit->GetName().c_str(), _me->GetEntry(), _vehicleInfo->m_ID, _me->GetGUID().ToString().c_str(), (int32)seat->first);
|
unit->GetName().c_str(), _me->GetEntry(), _vehicleInfo->m_ID, _me->GetGUID().ToString().c_str(), (int32)seat->first);
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ Map::~Map()
|
|||||||
{
|
{
|
||||||
WorldObject* obj = *i_worldObjects.begin();
|
WorldObject* obj = *i_worldObjects.begin();
|
||||||
ASSERT(obj->IsWorldObject());
|
ASSERT(obj->IsWorldObject());
|
||||||
|
LOG_ERROR("maps", "Map::~Map: WorldObject TypeId is not a corpse! (%u)", static_cast<uint8>(obj->GetTypeId()));
|
||||||
//ASSERT(obj->GetTypeId() == TYPEID_CORPSE);
|
//ASSERT(obj->GetTypeId() == TYPEID_CORPSE);
|
||||||
obj->RemoveFromWorld();
|
obj->RemoveFromWorld();
|
||||||
obj->ResetMap();
|
obj->ResetMap();
|
||||||
@@ -540,7 +541,7 @@ bool Map::AddToMap(T* obj, bool checkTransport)
|
|||||||
ASSERT(cellCoord.IsCoordValid());
|
ASSERT(cellCoord.IsCoordValid());
|
||||||
if (!cellCoord.IsCoordValid())
|
if (!cellCoord.IsCoordValid())
|
||||||
{
|
{
|
||||||
LOG_ERROR("maps", "Map::Add: Object %s has invalid coordinates X:%f Y:%f grid cell [%u:%u]",
|
LOG_ERROR("maps", "Map::AddToMap: Object %s has invalid coordinates X:%f Y:%f grid cell [%u:%u]",
|
||||||
obj->GetGUID().ToString().c_str(), obj->GetPositionX(), obj->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord);
|
obj->GetGUID().ToString().c_str(), obj->GetPositionX(), obj->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord);
|
||||||
return false; //Should delete object
|
return false; //Should delete object
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1103,8 +1103,8 @@ void Aura::UnregisterSingleTarget()
|
|||||||
Unit* caster = GetCaster();
|
Unit* caster = GetCaster();
|
||||||
if (!caster)
|
if (!caster)
|
||||||
{
|
{
|
||||||
LOG_INFO("misc", "Aura::UnregisterSingleTarget (A1) - %u, %u, %u, %s", GetId(), GetOwner()->GetTypeId(), GetOwner()->GetEntry(), GetOwner()->GetName().c_str());
|
LOG_INFO("spells", "Aura::UnregisterSingleTarget: (A1) - %u, %u, %u, %s", GetId(), GetOwner()->GetTypeId(), GetOwner()->GetEntry(), GetOwner()->GetName().c_str());
|
||||||
//ASSERT(caster);
|
LOG_ERROR("spells", "Aura::UnregisterSingleTarget: No caster was found."); //ASSERT(caster);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
caster->GetSingleCastAuras().remove(this);
|
caster->GetSingleCastAuras().remove(this);
|
||||||
|
|||||||
@@ -675,7 +675,7 @@ Spell::~Spell()
|
|||||||
{
|
{
|
||||||
// Clean the reference to avoid later crash.
|
// Clean the reference to avoid later crash.
|
||||||
// If this error is repeating, we may have to add an ASSERT to better track down how we get into this case.
|
// If this error is repeating, we may have to add an ASSERT to better track down how we get into this case.
|
||||||
LOG_ERROR("spells", "SPELL: deleting spell for spell ID %u. However, spell still referenced.", m_spellInfo->Id);
|
LOG_ERROR("spells", "Spell::~Spell: deleting spell for spell ID %u. However, spell still referenced.", m_spellInfo->Id);
|
||||||
*m_selfContainer = nullptr;
|
*m_selfContainer = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user