[7351] Fixed removing normal horde groups from queue.

Fixed Reflective shield - patch provided by Rastik. Thx

Signed-off-by: Triply <triply@getmangos.com>
This commit is contained in:
Triply 2009-02-27 11:08:57 +01:00
parent 95439564aa
commit 3560d9de54
5 changed files with 4 additions and 10 deletions

View file

@ -815,7 +815,7 @@ void BattleGround::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
DecreaseInvitedCount(team); DecreaseInvitedCount(team);
//we should update battleground queue, but only if bg isn't ending //we should update battleground queue, but only if bg isn't ending
if (GetQueueId() < MAX_BATTLEGROUND_QUEUES) if (GetStatus() < STATUS_WAIT_LEAVE)
sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].Update(bgTypeId, GetQueueId()); sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].Update(bgTypeId, GetQueueId());
Group * group = plr->GetGroup(); Group * group = plr->GetGroup();

View file

@ -208,7 +208,7 @@ void BattleGroundQueue::RemovePlayer(const uint64& guid, bool decreaseInvitedCou
{ {
//we must check premade and normal team's queue - because when players from premade are joining bg, //we must check premade and normal team's queue - because when players from premade are joining bg,
//they leave groupinfo so we can't use its players size to find out index //they leave groupinfo so we can't use its players size to find out index
for (uint32 j = index; j < BG_QUEUE_GROUP_TYPES_COUNT - 1; j += BG_QUEUE_NORMAL_ALLIANCE) for (uint32 j = index; j < BG_QUEUE_GROUP_TYPES_COUNT; j += BG_QUEUE_NORMAL_ALLIANCE)
{ {
for(group_itr_tmp = m_QueuedGroups[queue_id_tmp][j].begin(); group_itr_tmp != m_QueuedGroups[queue_id_tmp][j].end(); ++group_itr_tmp) for(group_itr_tmp = m_QueuedGroups[queue_id_tmp][j].begin(); group_itr_tmp != m_QueuedGroups[queue_id_tmp][j].end(); ++group_itr_tmp)
{ {
@ -628,11 +628,7 @@ should be called from BattleGround::RemovePlayer function in some cases
*/ */
void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BGQueueIdBasedOnLevel queue_id, uint8 arenaType, bool isRated, uint32 arenaRating) void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BGQueueIdBasedOnLevel queue_id, uint8 arenaType, bool isRated, uint32 arenaRating)
{ {
// this can happen when removing last player from battleground //if no players in queue - do nothing
if( queue_id == MAX_BATTLEGROUND_QUEUES )
return;
//if no players in queue ... do nothing
if( m_QueuedGroups[queue_id][BG_QUEUE_PREMADE_ALLIANCE].empty() && if( m_QueuedGroups[queue_id][BG_QUEUE_PREMADE_ALLIANCE].empty() &&
m_QueuedGroups[queue_id][BG_QUEUE_PREMADE_HORDE].empty() && m_QueuedGroups[queue_id][BG_QUEUE_PREMADE_HORDE].empty() &&
m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE].empty() && m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE].empty() &&

View file

@ -87,7 +87,6 @@ void WorldSession::HandleMoveWorldportAckOpcode()
return; return;
} }
//this will set player's team ... so IT MUST BE CALLED BEFORE SendInitialPacketsAfterAddToMap()
// battleground state prepare (in case join to BG), at relogin/tele player not invited // battleground state prepare (in case join to BG), at relogin/tele player not invited
// only add to bg group and object, if the player was invited (else he entered through command) // only add to bg group and object, if the player was invited (else he entered through command)
if(_player->InBattleGround()) if(_player->InBattleGround())

View file

@ -1730,7 +1730,6 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
Unit* caster = (*i)->GetCaster(); Unit* caster = (*i)->GetCaster();
if (!caster) if (!caster)
break; break;
int32 reflectDamage = 0;
AuraList const& vOverRideCS = caster->GetAurasByType(SPELL_AURA_DUMMY); AuraList const& vOverRideCS = caster->GetAurasByType(SPELL_AURA_DUMMY);
for(AuraList::const_iterator k = vOverRideCS.begin(); k != vOverRideCS.end(); ++k) for(AuraList::const_iterator k = vOverRideCS.begin(); k != vOverRideCS.end(); ++k)
{ {

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "7350" #define REVISION_NR "7351"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__