aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Battlegrounds/BattlegroundMgr.cpp
diff options
context:
space:
mode:
authorGolrag <golrag.jeremy@gmail.com>2024-05-25 21:05:14 +0200
committerShauren <shauren.trinity@gmail.com>2024-05-25 22:05:53 +0200
commit27e23600bb9c47440cca12a4ddaa4627166b0327 (patch)
treeb191fc2ae9179a4cefe769610db0cbac7b027078 /src/server/game/Battlegrounds/BattlegroundMgr.cpp
parent5b130cfb4253a94c08ff807e7f28e988651d2476 (diff)
Core/Players: Extended world_safe_locs with transport guid - this allows teleporting to a different map directly to a transport and having graveyards on transports
Diffstat (limited to 'src/server/game/Battlegrounds/BattlegroundMgr.cpp')
-rw-r--r--src/server/game/Battlegrounds/BattlegroundMgr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
index edef0191304..b2856d6ef7b 100644
--- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
@@ -469,7 +469,7 @@ void BattlegroundMgr::SendToBattleground(Player* player, uint32 instanceId, Batt
WorldSafeLocsEntry const* pos = bg->GetTeamStartPosition(Battleground::GetTeamIndexByTeamId(team));
TC_LOG_DEBUG("bg.battleground", "BattlegroundMgr::SendToBattleground: Sending {} to map {}, {} (bgType {})", player->GetName(), mapid, pos->Loc.ToString(), bgTypeId);
- player->TeleportTo(pos->Loc);
+ player->TeleportTo({ .Location = pos->Loc, .TransportGuid = pos->TransportSpawnId ? ObjectGuid::Create<HighGuid::Transport>(*pos->TransportSpawnId) : ObjectGuid::Empty });
}
else
TC_LOG_ERROR("bg.battleground", "BattlegroundMgr::SendToBattleground: Instance {} (bgType {}) not found while trying to teleport player {}", instanceId, bgTypeId, player->GetName());