[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
This commit is contained in:
megamage
2009-03-14 20:06:00 -06:00
parent ad8675a547
commit 47b39981a1
2 changed files with 14 additions and 12 deletions
+6 -1
View File
@@ -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);
}
}
}
+8 -11
View File
@@ -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