Core/Instances: Implemented confirmation dialog for players upon entering instance which would permanently bind the player to it, players can now choose to get saved or leave the instance
Also fixes broken build
This commit is contained in:
@@ -1741,3 +1741,22 @@ void WorldSession::HandleHearthAndResurrect(WorldPacket& /*recv_data*/)
|
||||
_player->ResurrectPlayer(100);
|
||||
_player->TeleportTo(_player->m_homebindMapId, _player->m_homebindX, _player->m_homebindY, _player->m_homebindZ, _player->GetOrientation());
|
||||
}
|
||||
|
||||
void WorldSession::HandleInstanceLockResponse(WorldPacket& recvPacket)
|
||||
{
|
||||
uint8 accept;
|
||||
recvPacket >> accept;
|
||||
|
||||
if (!_player->HasPendingBind())
|
||||
{
|
||||
sLog->outDetail("InstanceLockResponse: Player %s (guid %u) tried to bind himself/teleport to graveyard without a pending bind!", _player->GetName(), _player->GetGUIDLow());
|
||||
return;
|
||||
}
|
||||
|
||||
if (accept)
|
||||
_player->BindToInstance();
|
||||
else
|
||||
_player->RepopAtGraveyard();
|
||||
|
||||
_player->SetPendingBind(NULL, 0);
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x13C*/ { "SMSG_AI_REACTION", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
|
||||
/*0x13D*/ { "CMSG_SET_SELECTION", STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleSetSelectionOpcode },
|
||||
/*0x13E*/ { "CMSG_EQUIPMENT_SET_DELETE", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleEquipmentSetDelete },
|
||||
/*0x13F*/ { "CMSG_INSTANCE_LOCK_WARNING_RESPONSE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL },
|
||||
/*0x13F*/ { "CMSG_INSTANCE_LOCK_WARNING_RESPONSE", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleInstanceLockResponse },
|
||||
/*0x140*/ { "CMSG_UNUSED2", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL },
|
||||
/*0x141*/ { "CMSG_ATTACKSWING", STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleAttackSwingOpcode },
|
||||
/*0x142*/ { "CMSG_ATTACKSTOP", STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleAttackStopOpcode },
|
||||
|
||||
@@ -402,6 +402,11 @@ void WorldSession::LogoutPlayer(bool Save)
|
||||
_player->BuildPlayerRepop();
|
||||
_player->RepopAtGraveyard();
|
||||
}
|
||||
else if (_player->HasPendingBind())
|
||||
{
|
||||
_player->RepopAtGraveyard();
|
||||
_player->SetPendingBind(NULL, 0);
|
||||
}
|
||||
|
||||
//drop a flag if player is carrying it
|
||||
if (Battleground *bg = _player->GetBattleground())
|
||||
|
||||
@@ -754,6 +754,7 @@ class WorldSession
|
||||
void HandleWhoisOpcode(WorldPacket& recv_data);
|
||||
void HandleResetInstancesOpcode(WorldPacket& recv_data);
|
||||
void HandleHearthAndResurrect(WorldPacket& recv_data);
|
||||
void HandleInstanceLockResponse(WorldPacket& recvPacket);
|
||||
|
||||
// Looking for Dungeon/Raid
|
||||
void HandleLfgSetCommentOpcode(WorldPacket & recv_data);
|
||||
|
||||
Reference in New Issue
Block a user