fix(Core/Maps): Fix instance factions (#21577)
This commit is contained in:
parent
0161a611ef
commit
d145b866a5
4 changed files with 26 additions and 56 deletions
|
|
@ -2206,15 +2206,6 @@ bool InstanceMap::AddPlayerToMap(Player* player)
|
|||
m_resetAfterUnload = false;
|
||||
m_unloadWhenEmpty = false;
|
||||
|
||||
if (instance_data && instance_data->IsTwoFactionInstance()
|
||||
&& instance_data->GetTeamIdInInstance() == TEAM_NEUTRAL)
|
||||
{
|
||||
instance_data->SetTeamIdInInstance(player->GetTeamId());
|
||||
if (Group* group = player->GetGroup())
|
||||
if (Player* leader = ObjectAccessor::FindConnectedPlayer(group->GetLeaderGUID()))
|
||||
instance_data->SetTeamIdInInstance(leader->GetTeamId());
|
||||
}
|
||||
|
||||
// this will acquire the same mutex so it cannot be in the previous block
|
||||
Map::AddPlayerToMap(player);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue