Merge remote branch 'origin/master' into 330

This commit is contained in:
tomrus88 2010-03-30 13:06:34 +04:00
commit 4c8dd37612
46 changed files with 189 additions and 156 deletions

View file

@ -4178,7 +4178,7 @@ void Player::BuildPlayerRepop()
if(GetCorpse())
{
sLog.outError("BuildPlayerRepop: player %s(%d) already has a corpse", GetName(), GetGUIDLow());
assert(false);
ASSERT(false);
}
// create a corpse and place it at the player's location
@ -4372,7 +4372,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();
@ -8285,7 +8285,7 @@ void Player::SendPetSkillWipeConfirm()
void Player::SetVirtualItemSlot( uint8 i, Item* item)
{
assert(i < 3);
ASSERT(i < 3);
if(i < 2 && item)
{
if(!item->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT))
@ -11893,7 +11893,7 @@ void Player::UpdateItemDuration(uint32 time, bool realtimeonly)
Item* item = *itr;
++itr; // current element can be erased in UpdateDuration
if ((realtimeonly && item->GetProto()->Duration < 0) || !realtimeonly)
if ((realtimeonly && (item->GetProto()->ExtraFlags & ITEM_EXTRA_REAL_TIME_DURATION)) || !realtimeonly)
item->UpdateDuration(this,time);
}
}
@ -11902,7 +11902,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))
{
@ -13176,7 +13176,7 @@ void Player::SendPetTameFailure(PetTameFailureReason reason)
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();
@ -13565,7 +13565,7 @@ bool Player::SatisfyQuestPreviousQuest( Quest const* qInfo, bool msg )
ObjectMgr::ExclusiveQuestGroups::const_iterator iter2 = sObjectMgr.mExclusiveQuestGroups.lower_bound(qPrevInfo->GetExclusiveGroup());
ObjectMgr::ExclusiveQuestGroups::const_iterator end = sObjectMgr.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)
{
@ -13600,7 +13600,7 @@ bool Player::SatisfyQuestPreviousQuest( Quest const* qInfo, bool msg )
ObjectMgr::ExclusiveQuestGroups::const_iterator iter2 = sObjectMgr.mExclusiveQuestGroups.lower_bound(qPrevInfo->GetExclusiveGroup());
ObjectMgr::ExclusiveQuestGroups::const_iterator end = sObjectMgr.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)
{
@ -13703,7 +13703,7 @@ bool Player::SatisfyQuestExclusiveGroup( Quest const* qInfo, bool msg )
ObjectMgr::ExclusiveQuestGroups::const_iterator iter = sObjectMgr.mExclusiveQuestGroups.lower_bound(qInfo->GetExclusiveGroup());
ObjectMgr::ExclusiveQuestGroups::const_iterator end = sObjectMgr.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)
{
@ -14513,7 +14513,7 @@ void Player::SendQuestUpdateAddItem( Quest const* /*pQuest*/, uint32 /*item_idx*
void Player::SendQuestUpdateAddCreatureOrGo( Quest const* pQuest, ObjectGuid 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)
@ -15176,7 +15176,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
{
// save source node as recall coord to prevent recall and fall from sky
TaxiNodesEntry const* nodeEntry = sTaxiNodesStore.LookupEntry(node_id);
assert(nodeEntry); // checked in m_taxi.LoadTaxiDestinationsFromString
ASSERT(nodeEntry); // checked in m_taxi.LoadTaxiDestinationsFromString
m_recallMap = nodeEntry->map_id;
m_recallX = nodeEntry->x;
m_recallY = nodeEntry->y;
@ -16139,7 +16139,7 @@ void Player::ConvertInstancesToGroup(Player *player, Group *group, uint64 player
bool has_solo = false;
if(player) { player_guid = player->GetGUID(); 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
@ -16230,7 +16230,7 @@ bool Player::_LoadHomeBind(QueryResult *result)
void Player::SaveToDB()
{
// we should assure this: assert((m_nextSave != sWorld.getConfig(CONFIG_UINT32_INTERVAL_SAVE)));
// we should assure this: ASSERT((m_nextSave != sWorld.getConfig(CONFIG_UINT32_INTERVAL_SAVE)));
// delay auto save at any saves (manual, in code, or autosave)
m_nextSave = sWorld.getConfig(CONFIG_UINT32_INTERVAL_SAVE);
@ -18944,7 +18944,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);
}
@ -20111,7 +20111,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);
}