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 },
|
||||
|
||||
Reference in New Issue
Block a user