Revert "Get Team Id by group Leader instead of random player"

This reverts commit 2ee9fb4eb3.
This commit is contained in:
Yehonal
2016-09-05 16:57:29 +02:00
parent c71622438d
commit 2e4059c619
@@ -94,11 +94,9 @@ public:
if (TeamIdInInstance == TEAM_NEUTRAL) if (TeamIdInInstance == TEAM_NEUTRAL)
{ {
Map::PlayerList const &players = instance->GetPlayers(); Map::PlayerList const &players = instance->GetPlayers();
if (!players.isEmpty()) if( !players.isEmpty() )
if (Player* pPlayer = players.begin()->GetSource()) if( Player* pPlayer = players.begin()->GetSource() )
if (Group * group = pPlayer->GetGroup()) TeamIdInInstance = pPlayer->GetTeamId();
if(Player* groupLeader = ObjectAccessor::GetPlayer(*pPlayer,group->GetLeaderGUID()))
TeamIdInInstance = groupLeader->GetTeamId();
} }
switch( creature->GetEntry() ) switch( creature->GetEntry() )