mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 06:06:23 +00:00
Revert "Get Team Id by group Leader instead of random player"
This reverts commit 2ee9fb4eb3.
This commit is contained in:
@@ -94,11 +94,9 @@ public:
|
||||
if (TeamIdInInstance == TEAM_NEUTRAL)
|
||||
{
|
||||
Map::PlayerList const &players = instance->GetPlayers();
|
||||
if (!players.isEmpty())
|
||||
if (Player* pPlayer = players.begin()->GetSource())
|
||||
if (Group * group = pPlayer->GetGroup())
|
||||
if(Player* groupLeader = ObjectAccessor::GetPlayer(*pPlayer,group->GetLeaderGUID()))
|
||||
TeamIdInInstance = groupLeader->GetTeamId();
|
||||
if( !players.isEmpty() )
|
||||
if( Player* pPlayer = players.begin()->GetSource() )
|
||||
TeamIdInInstance = pPlayer->GetTeamId();
|
||||
}
|
||||
|
||||
switch( creature->GetEntry() )
|
||||
|
||||
Reference in New Issue
Block a user