[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:
cyberium 2012-09-09 02:23:20 +02:00 committed by Antz
parent 824aa5429e
commit f432438665
11 changed files with 120 additions and 193 deletions

View file

@ -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);