* updated new opcode names from mangos, added few opcodes from 2.4.2

* fixed: not send heartbeat packet if only turning
This commit is contained in:
bluma4862 2008-06-12 07:12:28 +00:00
parent 7780f608da
commit 342bce125e
6 changed files with 2128 additions and 2115 deletions

View File

@ -146,7 +146,7 @@ void MovementMgr::Update(bool sendDirect)
}*/
// if we are moving, and 500ms have passed, send an heartbeat packet. just in case 500ms have passed but the packet is sent by another function, do not send here
if( !sendDirect && (_moveFlags & MOVEMENTFLAG_ANY_MOVE) && _optime + MOVE_HEARTBEAT_DELAY < getMSTime())
if( !sendDirect && (_moveFlags & MOVEMENTFLAG_ANY_MOVE_NOT_TURNING) && _optime + MOVE_HEARTBEAT_DELAY < getMSTime())
{
_BuildPacket(MSG_MOVE_HEARTBEAT);
}

View File

@ -14,7 +14,8 @@ enum MovementFlagsEx
{
// custom flags
MOVEMENTFLAG_ANY_MOVE = (MOVEMENTFLAG_BACKWARD | MOVEMENTFLAG_FORWARD | MOVEMENTFLAG_STRAFE_LEFT | MOVEMENTFLAG_STRAFE_RIGHT
| MOVEMENTFLAG_LEFT | MOVEMENTFLAG_RIGHT)
| MOVEMENTFLAG_LEFT | MOVEMENTFLAG_RIGHT),
MOVEMENTFLAG_ANY_MOVE_NOT_TURNING = (MOVEMENTFLAG_BACKWARD | MOVEMENTFLAG_FORWARD | MOVEMENTFLAG_STRAFE_LEFT | MOVEMENTFLAG_STRAFE_RIGHT)
};
enum MoveModes

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -272,7 +272,7 @@ OpcodeHandler *WorldSession::_GetOpcodeHandlerTable() const
{ SMSG_AUTH_RESPONSE, &WorldSession::_HandleAuthResponseOpcode },
{SMSG_CHAR_ENUM, &WorldSession::_HandleCharEnumOpcode},
{SMSG_SET_PROFICIENCY, &WorldSession::_HandleSetProficiencyOpcode},
{SMSG_ACCOUNT_DATA_MD5, &WorldSession::_HandleAccountDataMD5Opcode},
{SMSG_ACCOUNT_DATA_TIMES, &WorldSession::_HandleAccountDataMD5Opcode},
{SMSG_MESSAGECHAT, &WorldSession::_HandleMessageChatOpcode},
{SMSG_NAME_QUERY_RESPONSE, &WorldSession::_HandleNameQueryResponseOpcode},
{SMSG_PONG, &WorldSession::_HandlePongOpcode},
@ -300,8 +300,8 @@ OpcodeHandler *WorldSession::_GetOpcodeHandlerTable() const
{SMSG_COMPRESSED_UPDATE_OBJECT, &WorldSession::_HandleCompressedUpdateObjectOpcode},
{SMSG_UPDATE_OBJECT, &WorldSession::_HandleUpdateObjectOpcode},
{SMSG_CAST_RESULT, &WorldSession::_HandleCastResultOpcode},
{SMSG_CAST_SUCCESS, &WorldSession::_HandleCastSuccessOpcode},
{SMSG_CAST_FAILED, &WorldSession::_HandleCastResultOpcode},
{SMSG_CLEAR_EXTRA_AURA_INFO, &WorldSession::_HandleCastSuccessOpcode},
{SMSG_ITEM_QUERY_SINGLE_RESPONSE, &WorldSession::_HandleItemQuerySingleResponseOpcode},
{SMSG_DESTROY_OBJECT, &WorldSession::_HandleDestroyObjectOpcode},
{SMSG_INITIAL_SPELLS, &WorldSession::_HandleInitialSpellsOpcode},

View File

@ -82,7 +82,7 @@ void WorldSocket::OnRead()
_crypt.DecryptRecv((uint8*)&hdr,sizeof(ServerPktHeader));
_remaining = ntohs(hdr.size)-2;
_opcode = hdr.cmd;
if(_opcode > MAX_OPCODE_ID) // no opcode has yet a number over 1000
if(_opcode > MAX_OPCODE_ID)
{
logcritical("CRYPT ERROR: opcode=%u, remain=%u",_opcode,_remaining); // this should never be the case!
GetSession()->GetInstance()->SetError(); // no way to recover the crypt, must exit