mirror of
https://github.com/mangosfour/server.git
synced 2025-12-22 04:37:01 +00:00
[12207] Rewrite Checks required when entering a map
Expected way from now on is: - Test if a map can be entered with Player::GetAreaTriggerLockStatus - IF this doesn't return AREA_LOCKSTATUS_OK, and if wanted, send the fail-message with Player::SendTransferAbortedByLockStatus function. Please feedback any hidden problems! Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
824aa5429e
commit
f432438665
11 changed files with 120 additions and 193 deletions
|
|
@ -805,6 +805,23 @@ void WorldSession::LoadTutorialsData()
|
|||
m_tutorialState = TUTORIALDATA_UNCHANGED;
|
||||
}
|
||||
|
||||
// Send chat information about aborted transfer (mostly used by Player::SendTransferAbortedByLockstatus())
|
||||
void WorldSession::SendTransferAborted(uint32 mapid, uint8 reason, uint8 arg)
|
||||
{
|
||||
WorldPacket data(SMSG_TRANSFER_ABORTED, 4 + 2);
|
||||
data << uint32(mapid);
|
||||
data << uint8(reason); // transfer abort reason
|
||||
switch (reason)
|
||||
{
|
||||
case TRANSFER_ABORT_INSUF_EXPAN_LVL:
|
||||
case TRANSFER_ABORT_DIFFICULTY:
|
||||
case TRANSFER_ABORT_UNIQUE_MESSAGE:
|
||||
data << uint8(arg);
|
||||
break;
|
||||
}
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::SendTutorialsData()
|
||||
{
|
||||
WorldPacket data(SMSG_TUTORIAL_FLAGS, 4 * 8);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue