[7457] Fixed set Bg raid leader to party or raid leader who entered Bg.

Removed useless code from my previous patch.

Signed-off-by: Triply <triply@getmangos.com>
This commit is contained in:
Triply 2009-03-14 20:20:28 +01:00
parent 435b53c853
commit 74006886e9
3 changed files with 15 additions and 13 deletions

View file

@ -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);
}
}
}

View file

@ -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

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7456"
#define REVISION_NR "7457"
#endif // __REVISION_NR_H__