Fixed SMSG_TRANSFER_ABORT opcode

This commit is contained in:
tomrus88 2008-10-27 09:08:25 +03:00
parent 233e5eac6f
commit 002a2fc5fc
7 changed files with 33 additions and 23 deletions

View file

@ -1464,7 +1464,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
if(GetTransport())
RepopAtGraveyard(); // teleport to near graveyard if on transport, looks blizz like :)
SendTransferAborted(mapid, TRANSFER_ABORT_INSUF_EXPAN_LVL1);
SendTransferAborted(mapid, TRANSFER_ABORT_INSUF_EXPAN_LVL, mEntry->Expansion());
return false; // normal client can't teleport to this map...
}
@ -17521,11 +17521,19 @@ void Player::SendUpdateToOutOfRangeGroupMembers()
pet->ResetAuraUpdateMask();
}
void Player::SendTransferAborted(uint32 mapid, uint16 reason)
void Player::SendTransferAborted(uint32 mapid, uint8 reason, uint8 arg)
{
WorldPacket data(SMSG_TRANSFER_ABORTED, 4+2);
data << uint32(mapid);
data << uint16(reason); // transfer abort reason
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;
}
GetSession()->SendPacket(&data);
}