*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
+16 -16
View File
@@ -1257,7 +1257,7 @@ void Player::Update(uint32 p_time)
// If this is set during update SetSpellModTakingSpell call is missing somewhere in the code
// Having this would prevent more aura charges to be dropped, so let's crash
//assert (!m_spellModTakingSpell);
//ASSERT (!m_spellModTakingSpell);
if ( m_spellModTakingSpell)
{
//sLog.outCrash("Player has m_pad %u during update!", m_pad);
@@ -1797,7 +1797,7 @@ void Player::TeleportOutOfMap(Map *oldMap)
{
sLog.outCrash("Cannot teleport player out of map!");
ResetMap();
assert(false);
ASSERT(false);
}
}
@@ -4842,7 +4842,7 @@ void Player::CreateCorpse()
// we don't SaveToDB for players in battlegrounds so don't do it for corpses either
const MapEntry *entry = sMapStore.LookupEntry(corpse->GetMapId());
assert(entry);
ASSERT(entry);
if (entry->map_type != MAP_BATTLEGROUND)
corpse->SaveToDB();
@@ -9177,7 +9177,7 @@ void Player::ResetPetTalents()
void Player::SetVirtualItemSlot(uint8 i, Item* item)
{
assert(i < 3);
ASSERT(i < 3);
if (i < 2 && item)
{
if (!item->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT))
@@ -12873,7 +12873,7 @@ void Player::UpdateEnchantTime(uint32 time)
{
for (EnchantDurationList::iterator itr = m_enchantDuration.begin(),next; itr != m_enchantDuration.end(); itr=next)
{
assert(itr->item);
ASSERT(itr->item);
next = itr;
if (!itr->item->GetEnchantmentId(itr->slot))
{
@@ -14251,7 +14251,7 @@ bool Player::CanRewardQuest(Quest const *pQuest, uint32 reward, bool msg)
void Player::AddQuest(Quest const *pQuest, Object *questGiver)
{
uint16 log_slot = FindQuestSlot(0);
assert(log_slot < MAX_QUEST_LOG_SIZE);
ASSERT(log_slot < MAX_QUEST_LOG_SIZE);
uint32 quest_id = pQuest->GetQuestId();
@@ -14677,7 +14677,7 @@ bool Player::SatisfyQuestPreviousQuest(Quest const* qInfo, bool msg)
ObjectMgr::ExclusiveQuestGroups::iterator iter2 = objmgr.mExclusiveQuestGroups.lower_bound(qPrevInfo->GetExclusiveGroup());
ObjectMgr::ExclusiveQuestGroups::iterator end = objmgr.mExclusiveQuestGroups.upper_bound(qPrevInfo->GetExclusiveGroup());
assert(iter2 != end); // always must be found if qPrevInfo->ExclusiveGroup != 0
ASSERT(iter2 != end); // always must be found if qPrevInfo->ExclusiveGroup != 0
for (; iter2 != end; ++iter2)
{
@@ -14712,7 +14712,7 @@ bool Player::SatisfyQuestPreviousQuest(Quest const* qInfo, bool msg)
ObjectMgr::ExclusiveQuestGroups::iterator iter2 = objmgr.mExclusiveQuestGroups.lower_bound(qPrevInfo->GetExclusiveGroup());
ObjectMgr::ExclusiveQuestGroups::iterator end = objmgr.mExclusiveQuestGroups.upper_bound(qPrevInfo->GetExclusiveGroup());
assert(iter2 != end); // always must be found if qPrevInfo->ExclusiveGroup != 0
ASSERT(iter2 != end); // always must be found if qPrevInfo->ExclusiveGroup != 0
for (; iter2 != end; ++iter2)
{
@@ -14814,7 +14814,7 @@ bool Player::SatisfyQuestExclusiveGroup(Quest const* qInfo, bool msg)
ObjectMgr::ExclusiveQuestGroups::iterator iter = objmgr.mExclusiveQuestGroups.lower_bound(qInfo->GetExclusiveGroup());
ObjectMgr::ExclusiveQuestGroups::iterator end = objmgr.mExclusiveQuestGroups.upper_bound(qInfo->GetExclusiveGroup());
assert(iter != end); // always must be found if qInfo->ExclusiveGroup != 0
ASSERT(iter != end); // always must be found if qInfo->ExclusiveGroup != 0
for (; iter != end; ++iter)
{
@@ -15687,7 +15687,7 @@ void Player::SendQuestUpdateAddItem(Quest const* /*pQuest*/, uint32 /*item_idx*/
void Player::SendQuestUpdateAddCreatureOrGo(Quest const* pQuest, uint64 guid, uint32 creatureOrGO_idx, uint32 old_count, uint32 add_count)
{
assert(old_count + add_count < 65536 && "mob/GO count store in 16 bits 2^16 = 65536 (0..65536)");
ASSERT(old_count + add_count < 65536 && "mob/GO count store in 16 bits 2^16 = 65536 (0..65536)");
int32 entry = pQuest->ReqCreatureOrGOId[ creatureOrGO_idx ];
if (entry < 0)
@@ -16160,7 +16160,7 @@ bool Player::LoadFromDB(uint32 guid, SqlQueryHolder *holder)
TaxiNodesEntry const* nodeEntry = sTaxiNodesStore.LookupEntry(node_id);
if (nodeEntry && nodeEntry->map_id == GetMapId())
{
assert(nodeEntry); // checked in m_taxi.LoadTaxiDestinationsFromString
ASSERT(nodeEntry); // checked in m_taxi.LoadTaxiDestinationsFromString
mapId = nodeEntry->map_id;
Relocate(nodeEntry->x, nodeEntry->y, nodeEntry->z,0.0f);
}
@@ -17440,7 +17440,7 @@ void Player::ConvertInstancesToGroup(Player *player, Group *group, uint64 player
if (!group)
group = player->GetGroup();
}
assert(player_guid);
ASSERT(player_guid);
// copy all binds to the group, when changing leader it's assumed the character
// will not have any solo binds
@@ -18614,7 +18614,7 @@ void Player::StopCastingCharm()
if (charm->GetCharmerGUID())
{
sLog.outCrash("Charmed unit has charmer guid " UI64FMTD, charm->GetCharmerGUID());
assert(false);
ASSERT(false);
}
else
SetCharm(charm, false);
@@ -19009,7 +19009,7 @@ void Player::RestoreSpellMods(Spell * spell)
// Skip this check for now - aura charges may change due to various reason
// TODO: trac these changes correctly
//assert (mod->ownerAura->GetCharges() <= mod->charges);
//ASSERT (mod->ownerAura->GetCharges() <= mod->charges);
}
}
}
@@ -20876,7 +20876,7 @@ void Player::SetGroup(Group *group, int8 subgroup)
else
{
// never use SetGroup without a subgroup unless you specify NULL for group
assert(subgroup >= 0);
ASSERT(subgroup >= 0);
m_group.link(group, this);
m_group.setSubGroup((uint8)subgroup);
}
@@ -22146,7 +22146,7 @@ void Player::SetOriginalGroup(Group *group, int8 subgroup)
else
{
// never use SetOriginalGroup without a subgroup unless you specify NULL for group
assert(subgroup >= 0);
ASSERT(subgroup >= 0);
m_originalGroup.link(group, this);
m_originalGroup.setSubGroup((uint8)subgroup);
}