From 9f8293a5a0214bd81a5b4614ca0e7366371c5a77 Mon Sep 17 00:00:00 2001 From: djayk1 Date: Mon, 23 Jun 2014 11:35:52 -0300 Subject: [PATCH 1/8] Update game.lua --- modules/gamelib/game.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gamelib/game.lua b/modules/gamelib/game.lua index 54ac7a8d..28d6c4ab 100644 --- a/modules/gamelib/game.lua +++ b/modules/gamelib/game.lua @@ -55,7 +55,7 @@ function g_game.getSupportedClients() 970, 972, 973, 980, 981, 982, 983, 984, 985, 986, 1001, 1002, 1010, 1020, 1021, 1022, 1031, 1034, 1035, - 1036, 1037 + 1036, 1037, 1038, 1039, 1040, 1041 } end From 468ac9cbd2dac4e22c53f53b1d28db88fd3f0dff Mon Sep 17 00:00:00 2001 From: djayk1 Date: Mon, 23 Jun 2014 11:38:15 -0300 Subject: [PATCH 2/8] Update game.cpp --- src/client/game.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/game.cpp b/src/client/game.cpp index 17a813d7..45fa3793 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -1459,7 +1459,7 @@ void Game::setProtocolVersion(int version) if(isOnline()) stdext::throw_exception("Unable to change protocol version while online"); - if(version != 0 && (version < 760 || version > 1037)) + if(version != 0 && (version < 760 || version > 1041)) stdext::throw_exception(stdext::format("Protocol version %d not supported", version)); m_features.reset(); @@ -1587,7 +1587,7 @@ void Game::setClientVersion(int version) if(isOnline()) stdext::throw_exception("Unable to change client version while online"); - if(version != 0 && (version < 760 || version > 1037)) + if(version != 0 && (version < 760 || version > 1041)) stdext::throw_exception(stdext::format("Client version %d not supported", version)); m_clientVersion = version; From 94686d3fe873f565e99eb8e5dea6a5c4d54bc2fb Mon Sep 17 00:00:00 2001 From: djayk1 Date: Mon, 23 Jun 2014 11:39:43 -0300 Subject: [PATCH 3/8] Update protocolgameparse.cpp --- src/client/protocolgameparse.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/client/protocolgameparse.cpp b/src/client/protocolgameparse.cpp index 42d552a2..e53e1182 100644 --- a/src/client/protocolgameparse.cpp +++ b/src/client/protocolgameparse.cpp @@ -1022,6 +1022,7 @@ void ProtocolGame::parsePlayerInfo(const InputMessagePtr& msg) { bool premium = msg->getU8(); // premium int vocation = msg->getU8(); // vocation + int premiumEx = msg->getU32(); // premium expiration int spellCount = msg->getU16(); std::vector spells; From cc483fba5a0ce2946d3c86600ab2a9d082eb5e85 Mon Sep 17 00:00:00 2001 From: djayk1 Date: Mon, 23 Jun 2014 12:04:30 -0300 Subject: [PATCH 4/8] Update game.cpp --- src/client/game.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/client/game.cpp b/src/client/game.cpp index 45fa3793..a95f7675 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -1571,6 +1571,10 @@ void Game::setProtocolVersion(int version) enableFeature(Otc::GameCreatureIcons); enableFeature(Otc::GameHideNpcNames); } + + if(version >= 1039) { + enableFeature(Otc::GamePremiumExpiration) + } m_protocolVersion = version; From 1a77473e13593f212c3accaee8d887085bc8521f Mon Sep 17 00:00:00 2001 From: djayk1 Date: Mon, 23 Jun 2014 12:05:35 -0300 Subject: [PATCH 5/8] Update const.h --- src/client/const.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/client/const.h b/src/client/const.h index 0b4e85c6..268af7f4 100644 --- a/src/client/const.h +++ b/src/client/const.h @@ -388,6 +388,7 @@ namespace Otc GameCreatureIcons = 54, GameHideNpcNames = 55, GameSpritesAlphaChannel = 56, + GamePremiumExpiration = 57, LastGameFeature = 101 }; From 85fe5867f3476dd3fb12378af26a0ad37f4c40ee Mon Sep 17 00:00:00 2001 From: djayk1 Date: Mon, 23 Jun 2014 12:07:38 -0300 Subject: [PATCH 6/8] Update protocolgameparse.cpp --- src/client/protocolgameparse.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/protocolgameparse.cpp b/src/client/protocolgameparse.cpp index e53e1182..fd727f19 100644 --- a/src/client/protocolgameparse.cpp +++ b/src/client/protocolgameparse.cpp @@ -1022,7 +1022,8 @@ void ProtocolGame::parsePlayerInfo(const InputMessagePtr& msg) { bool premium = msg->getU8(); // premium int vocation = msg->getU8(); // vocation - int premiumEx = msg->getU32(); // premium expiration + if(g_game.getFeature(Otc::GamePremiumExpiration)) + int premiumEx = msg->getU32(); // premium expiration int spellCount = msg->getU16(); std::vector spells; From ec99d35cee552a41bbf91506fdc5513fba5ef510 Mon Sep 17 00:00:00 2001 From: djayk1 Date: Mon, 23 Jun 2014 12:19:12 -0300 Subject: [PATCH 7/8] Update game.cpp --- src/client/game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/game.cpp b/src/client/game.cpp index a95f7675..c45ae6cd 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -1572,7 +1572,7 @@ void Game::setProtocolVersion(int version) enableFeature(Otc::GameHideNpcNames); } - if(version >= 1039) { + if(version >= 1041) { enableFeature(Otc::GamePremiumExpiration) } From 10438c21ff98fede957dfae352672afc83295c68 Mon Sep 17 00:00:00 2001 From: djayk1 Date: Mon, 23 Jun 2014 12:20:12 -0300 Subject: [PATCH 8/8] Update game.cpp --- src/client/game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/game.cpp b/src/client/game.cpp index c45ae6cd..0b8140f0 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -1573,7 +1573,7 @@ void Game::setProtocolVersion(int version) } if(version >= 1041) { - enableFeature(Otc::GamePremiumExpiration) + enableFeature(Otc::GamePremiumExpiration); } m_protocolVersion = version;