Fix for version 8.40

master
Sam 10 years ago
parent 03de13d618
commit 3750a85c5f

@ -1472,7 +1472,7 @@ void Game::setProtocolVersion(int version)
{ {
enableFeature(Otc::GameLooktypeU16); enableFeature(Otc::GameLooktypeU16);
enableFeature(Otc::GameMessageStatements); enableFeature(Otc::GameMessageStatements);
enableFeature(Otc::GameWritableDate); // might not be since 770 enableFeature(Otc::GameWritableDate);
} }
if(version >= 780) if(version >= 780)
@ -1485,15 +1485,18 @@ void Game::setProtocolVersion(int version)
enableFeature(Otc::GameNewOutfitProtocol); enableFeature(Otc::GameNewOutfitProtocol);
} }
if(version >= 780 && version <= 854) { // 780 might not be accurate
enableFeature(Otc::GameChargeableItems);
}
if(version >= 840) { if(version >= 840) {
enableFeature(Otc::GameProtocolChecksum); enableFeature(Otc::GameProtocolChecksum);
enableFeature(Otc::GameChallengeOnLogin);
enableFeature(Otc::GameAccountNames); enableFeature(Otc::GameAccountNames);
enableFeature(Otc::GameDoubleFreeCapacity); enableFeature(Otc::GameDoubleFreeCapacity);
} }
if(version >= 780 && version <= 854) { // 780 might not be accurate if(version >= 841) {
enableFeature(Otc::GameChargeableItems); enableFeature(Otc::GameChallengeOnLogin);
} }
if(version >= 854) { if(version >= 854) {

@ -56,7 +56,7 @@ void ProtocolGame::onRecv(const InputMessagePtr& inputMessage)
if(m_firstRecv) { if(m_firstRecv) {
m_firstRecv = false; m_firstRecv = false;
if(g_game.getProtocolVersion() > 810) { if(g_game.getProtocolVersion() >= 841) { // not sure since which version this is, but it seems to be after 8.40
int size = inputMessage->getU16(); int size = inputMessage->getU16();
if(size != inputMessage->getUnreadSize()) { if(size != inputMessage->getUnreadSize()) {
g_logger.traceError("invalid message size"); g_logger.traceError("invalid message size");

Loading…
Cancel
Save