diff options
| author | megamage <none@none> | 2009-03-14 20:06:00 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2009-03-14 20:06:00 -0600 |
| commit | 47b39981a1693ba931743c0ac1d4e092ec62a2d8 (patch) | |
| tree | b63e0ecb172d7d40d0d01701db7472a83bee5651 /src | |
| parent | ad8675a5474d6f550bd064a3de3fb2e27fe32374 (diff) | |
[7457] Fixed set Bg raid leader to party or raid leader who entered Bg. Author: Triply
Removed useless code from my previous patch.
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/BattleGround.cpp | 7 | ||||
| -rw-r--r-- | src/game/Group.cpp | 19 |
2 files changed, 14 insertions, 12 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index 5a3d36fcb5b..1cc510a35f2 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -1170,7 +1170,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 dca1a5ad9b8..f4a977c3d7c 100644 --- a/src/game/Group.cpp +++ b/src/game/Group.cpp @@ -390,19 +390,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 |
