diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index 45ab6cf8d..1d0c34ad5 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -1162,7 +1162,12 @@ void BattleGround::AddOrSetPlayerToCorrectBgGroup(Player *plr, uint64 plr_guid, plr->SetBattleGroundRaid(group, subgroup); } else - GetBgRaid(team)->AddMember(plr_guid, plr->GetName()); + { + group->AddMember(plr_guid, plr->GetName()); + if( Group* originalGroup = plr->GetOriginalGroup() ) + if( originalGroup->IsLeader(plr_guid) ) + group->ChangeLeader(plr_guid); + } } } diff --git a/src/game/Group.cpp b/src/game/Group.cpp index de26cb666..e6e01aa13 100644 --- a/src/game/Group.cpp +++ b/src/game/Group.cpp @@ -386,19 +386,16 @@ void Group::Disband(bool hideDestroy) continue; //we cannot call _removeMember because it would invalidate member iterator - if (player) + //if we are removing player from battleground raid + if( isBGGroup() ) + player->RemoveFromBattleGroundRaid(); + else { - //if we are removing player from battleground raid - if( isBGGroup() ) - player->RemoveFromBattleGroundRaid(); + //we can remove player who is in battleground from his original group + if( player->GetOriginalGroup() == this ) + player->SetOriginalGroup(NULL); else - { - //we can remove player who is in battleground from his original group - if( player->GetOriginalGroup() == this ) - player->SetOriginalGroup(NULL); - else - player->SetGroup(NULL); - } + player->SetGroup(NULL); } // quest related GO state dependent from raid membership diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index f81c4b84c..be55dc98e 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7456" + #define REVISION_NR "7457" #endif // __REVISION_NR_H__