support for protocol854
This commit is contained in:
parent
5a47e9d8a9
commit
5584bfdd99
1
TODO
1
TODO
|
@ -35,6 +35,7 @@ select characters in lineedits
|
|||
scrolling multiline edit
|
||||
mouse wheel lineedits
|
||||
onMapKnown event
|
||||
save different account/pasword/server for each otclient protocol version
|
||||
|
||||
== OPTIMIZATIONS AND REWORKS
|
||||
* game
|
||||
|
|
|
@ -50,7 +50,7 @@ struct ThingType
|
|||
IsStackable,
|
||||
IsForceUse,
|
||||
IsMultiUse,
|
||||
#if PROTOCOL<=810
|
||||
#if PROTOCOL<=854
|
||||
IsRune,
|
||||
#endif
|
||||
IsWritable,
|
||||
|
|
|
@ -25,7 +25,12 @@
|
|||
|
||||
#include <otclient/global.h>
|
||||
|
||||
#if PROTOCOL != 860 && PROTOCOL != 861 && PROTOCOL != 862 && PROTOCOL != 870 && PROTOCOL != 810
|
||||
#if PROTOCOL != 810 && \
|
||||
PROTOCOL != 854 && \
|
||||
PROTOCOL != 860 && \
|
||||
PROTOCOL != 861 && \
|
||||
PROTOCOL != 862 && \
|
||||
PROTOCOL != 870
|
||||
#error "the supplied protocol version is not supported"
|
||||
#endif
|
||||
|
||||
|
@ -47,10 +52,10 @@ namespace Proto {
|
|||
constexpr int ClientVersion = PROTOCOL;
|
||||
constexpr int PicSignature = 0x4E119CBF;
|
||||
|
||||
#if PROTOCOL>=861
|
||||
constexpr int NumViolationReasons = 19;
|
||||
#elif PROTOCOL>=860
|
||||
#if PROTOCOL>=860
|
||||
constexpr int NumViolationReasons = 20;
|
||||
#elif PROTOCOL>=854
|
||||
constexpr int NumViolationReasons = 19;
|
||||
#elif PROTOCOL>=810
|
||||
constexpr int NumViolationReasons = 32;
|
||||
#endif
|
||||
|
@ -247,7 +252,7 @@ namespace Proto {
|
|||
ServerSpeakRVRAnswer,
|
||||
ServerSpeakRVRContinue,
|
||||
ServerSpeakChannelRed2
|
||||
#elif PROTOCOL>=860
|
||||
#elif PROTOCOL>=854
|
||||
ServerSpeakSay = 1,
|
||||
ServerSpeakWhisper,
|
||||
ServerSpeakYell,
|
||||
|
@ -263,7 +268,9 @@ namespace Proto {
|
|||
ServerSpeakChannelRed,
|
||||
ServerSpeakPrivateRed,
|
||||
ServerSpeakChannelOrange,
|
||||
// 16 ??
|
||||
ServerSpeakChannelRed2 = 17,
|
||||
// 18 ??
|
||||
ServerSpeakMonsterSay = 19,
|
||||
ServerSpeakMonsterYell
|
||||
#elif PROTOCOL>=810
|
||||
|
@ -304,7 +311,7 @@ namespace Proto {
|
|||
MessageStatusSmall,
|
||||
MessageConsoleBlue,
|
||||
MessageConsoleRed
|
||||
#elif PROTOCOL>=860
|
||||
#elif PROTOCOL>=854
|
||||
MessageConsoleRed = 18,
|
||||
MessageConsoleOrange,
|
||||
MessageConsoleOrange2,
|
||||
|
|
|
@ -43,7 +43,7 @@ void ProtocolGame::onConnect()
|
|||
{
|
||||
recv();
|
||||
|
||||
#if PROTOCOL>=860
|
||||
#if PROTOCOL>=854
|
||||
m_waitingLoginPacket = true;
|
||||
#else
|
||||
sendLoginPacket(0, 0);
|
||||
|
|
|
@ -398,7 +398,7 @@ void ProtocolGame::parseTileAddThing(InputMessage& msg)
|
|||
Position pos = parsePosition(msg);
|
||||
int stackPos = -1;
|
||||
|
||||
#if PROTOCOL>=860
|
||||
#if PROTOCOL>=854
|
||||
stackPos = msg.getU8();
|
||||
#endif
|
||||
|
||||
|
@ -762,7 +762,7 @@ void ProtocolGame::parsePlayerStats(InputMessage& msg)
|
|||
{
|
||||
double health = msg.getU16();
|
||||
double maxHealth = msg.getU16();
|
||||
#if PROTOCOL>=860
|
||||
#if PROTOCOL>=854
|
||||
double freeCapacity = msg.getU32() / 100.0;
|
||||
#else
|
||||
double freeCapacity = msg.getU16() / 100.0;
|
||||
|
@ -1272,7 +1272,7 @@ ThingPtr ProtocolGame::internalGetThing(InputMessage& msg)
|
|||
int emblem = -1;
|
||||
bool passable = false;
|
||||
|
||||
#if PROTOCOL>=860
|
||||
#if PROTOCOL>=854
|
||||
if(thingId == 0x0061)
|
||||
emblem = msg.getU8();
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ void ProtocolGame::sendLoginPacket(uint timestamp, uint8 unknown)
|
|||
msg.addU8(0); // is gm set?
|
||||
paddingBytes -= 17;
|
||||
|
||||
#if PROTOCOL>=860
|
||||
#if PROTOCOL>=854
|
||||
enableChecksum();
|
||||
|
||||
msg.addString(m_accountName);
|
||||
|
@ -60,7 +60,7 @@ void ProtocolGame::sendLoginPacket(uint timestamp, uint8 unknown)
|
|||
msg.addU32(timestamp);
|
||||
msg.addU8(unknown);
|
||||
paddingBytes -= 11 + m_accountName.length() + m_characterName.length() + m_accountPassword.length();
|
||||
#elif PROTOCOL>=810
|
||||
#else // PROTOCOL>=810
|
||||
msg.addU32(Fw::fromstring<uint32>(m_accountName));
|
||||
msg.addString(m_characterName);
|
||||
msg.addString(m_accountPassword);
|
||||
|
|
|
@ -110,7 +110,7 @@ void ProtocolLogin::sendLoginPacket()
|
|||
msg.addU32(m_xteaKey[3]);
|
||||
paddingBytes -= 16;
|
||||
|
||||
#if PROTOCOL>=860
|
||||
#if PROTOCOL>=854
|
||||
enableChecksum();
|
||||
|
||||
msg.addString(m_accountName);
|
||||
|
|
Loading…
Reference in New Issue