Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/CFBG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,12 @@ void CFBG::BalanceTeamsOnEntry(Battleground* bg, Player* player)
bg->DecreaseInvitedCount(provisional);
bg->IncreaseInvitedCount(corrected);
player->GetBGData().bgTeamId = corrected;

// The player was already teleported to the provisional base before AddPlayer;
// move them to the corrected base so they don't spawn at the enemy's.
Position const* startPos = bg->GetTeamStartPosition(corrected);
player->TeleportTo(bg->GetMapId(), startPos->GetPositionX(), startPos->GetPositionY(),
startPos->GetPositionZ(), startPos->GetOrientation());
}

uint32 CFBG::GetMorphFromRace(uint8 race, uint8 gender)
Expand Down
Loading