mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Wintergrasp: fix leaving Wintergrasp via the minimap button.
This commit is contained in:
@@ -375,6 +375,14 @@ void Battlefield::AskToLeaveQueue(Player* player)
|
||||
m_PlayersInQueue[player->GetTeamId()].erase(player->GetGUID());
|
||||
}
|
||||
|
||||
// Called in WorldSession::HandleHearthAndResurrect
|
||||
void Battlefield::PlayerAskToLeave(Player* player)
|
||||
{
|
||||
// Player leaving Wintergrasp, teleport to Dalaran.
|
||||
// ToDo: confirm teleport destination.
|
||||
player->TeleportTo(571, 5804.1499f, 624.7710f, 647.7670f, 1.6400f);
|
||||
}
|
||||
|
||||
// Called in WorldSession::HandleBfEntryInviteResponse
|
||||
void Battlefield::PlayerAcceptInviteToWar(Player* player)
|
||||
{
|
||||
|
||||
@@ -309,6 +309,7 @@ class TC_GAME_API Battlefield : public ZoneScript
|
||||
void PlayerAcceptInviteToWar(Player* player);
|
||||
uint32 GetBattleId() const { return m_BattleId; }
|
||||
void AskToLeaveQueue(Player* player);
|
||||
void PlayerAskToLeave(Player* player);
|
||||
|
||||
virtual void DoCompleteOrIncrementAchievement(uint32 /*achievement*/, Player* /*player*/, uint8 /*incrementNumber = 1*/) { }
|
||||
|
||||
|
||||
@@ -1741,9 +1741,9 @@ void WorldSession::HandleHearthAndResurrect(WorldPacket& /*recvData*/)
|
||||
if (_player->IsInFlight())
|
||||
return;
|
||||
|
||||
if (/*Battlefield* bf = */sBattlefieldMgr->GetBattlefieldToZoneId(_player->GetZoneId()))
|
||||
if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(_player->GetZoneId()))
|
||||
{
|
||||
// bf->PlayerAskToLeave(_player); FIXME
|
||||
bf->PlayerAskToLeave(_player);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user