*use ASSERT macro instead of regular assert for better output.

--HG--
branch : trunk
This commit is contained in:
QAston
2010-07-30 20:04:28 +02:00
parent 3dc29732b7
commit 48b360097c
50 changed files with 261 additions and 261 deletions
+5 -5
View File
@@ -197,14 +197,14 @@ Corpse* ObjectAccessor::GetCorpseForPlayerGUID(uint64 guid)
if (iter == i_player2corpse.end())
return NULL;
assert(iter->second->GetType() != CORPSE_BONES);
ASSERT(iter->second->GetType() != CORPSE_BONES);
return iter->second;
}
void ObjectAccessor::RemoveCorpse(Corpse* corpse)
{
assert(corpse && corpse->GetType() != CORPSE_BONES);
ASSERT(corpse && corpse->GetType() != CORPSE_BONES);
if (corpse->FindMap())
corpse->FindMap()->Remove(corpse, false);
@@ -231,13 +231,13 @@ void ObjectAccessor::RemoveCorpse(Corpse* corpse)
void ObjectAccessor::AddCorpse(Corpse* corpse)
{
assert(corpse && corpse->GetType() != CORPSE_BONES);
ASSERT(corpse && corpse->GetType() != CORPSE_BONES);
// Critical section
{
ACE_GUARD(LockType, g, i_corpseGuard);
assert(i_player2corpse.find(corpse->GetOwnerGUID()) == i_player2corpse.end());
ASSERT(i_player2corpse.find(corpse->GetOwnerGUID()) == i_player2corpse.end());
i_player2corpse[corpse->GetOwnerGUID()] = corpse;
// build mapid*cellid -> guid_set map
@@ -354,7 +354,7 @@ void ObjectAccessor::Update(uint32 /*diff*/)
while (!i_objects.empty())
{
Object* obj = *i_objects.begin();
assert(obj && obj->IsInWorld());
ASSERT(obj && obj->IsInWorld());
i_objects.erase(i_objects.begin());
obj->BuildUpdate(update_players);
}
+1 -1
View File
@@ -127,7 +127,7 @@ class ObjectAccessor
// returns object if is in map
template<class T> static T* GetObjectInMap(uint64 guid, Map * map, T* /*typeSpecifier*/)
{
assert(map);
ASSERT(map);
if (T * obj = GetObjectInWorld(guid, (T*)NULL))
if (obj->GetMap() == map)
return obj;
+1 -1
View File
@@ -8994,7 +8994,7 @@ void ObjectMgr::RemoveGMTicket(GM_Ticket *ticket, int64 source, bool permanently
void ObjectMgr::RemoveGMTicket(uint64 ticketGuid, int64 source, bool permanently)
{
GM_Ticket *ticket = GetGMTicket(ticketGuid);
assert(ticket);
ASSERT(ticket);
RemoveGMTicket(ticket, source, permanently);
}