Added latest protocol/client support for cipservers

master
BeniS 11 years ago
parent 0bf909d52f
commit 5f26303389

@ -212,8 +212,6 @@ function save()
} }
end end
table.dump(hotkeys)
hotkeyList = hotkeys hotkeyList = hotkeys
g_settings.setNode('game_hotkeys', hotkeySettings) g_settings.setNode('game_hotkeys', hotkeySettings)
g_settings.save() g_settings.save()

@ -37,14 +37,15 @@ function g_game.getSupportedProtocols()
810, 811, 840, 842, 850, 853, 854, 810, 811, 840, 842, 850, 853, 854,
860, 861, 862, 870, 910, 940, 944, 860, 861, 862, 870, 910, 940, 944,
953, 954, 960, 961, 963, 970, 971, 953, 954, 960, 961, 963, 970, 971,
973 973, 974
} }
end end
function g_game.getSupportedClients(protocol) function g_game.getSupportedClients(protocol)
clients = { clients = {
[971] = {980}, [971] = {980},
[973] = {981} [973] = {981},
[974] = {982}
} }
return clients[protocol] or {protocol} return clients[protocol] or {protocol}
end end

@ -1374,7 +1374,7 @@ void Game::setProtocolVersion(int version)
if(isOnline()) if(isOnline())
stdext::throw_exception("Unable to change protocol version while online"); stdext::throw_exception("Unable to change protocol version while online");
if(version != 0 && (version < 810 || version > 973)) if(version != 0 && (version < 810 || version > 974))
stdext::throw_exception(stdext::format("Protocol version %d not supported", version)); stdext::throw_exception(stdext::format("Protocol version %d not supported", version));
m_features.reset(); m_features.reset();
@ -1453,7 +1453,7 @@ void Game::setClientVersion(int version)
if(isOnline()) if(isOnline())
stdext::throw_exception("Unable to change client version while online"); stdext::throw_exception("Unable to change client version while online");
if(version != 0 && (version < 810 || version > 981)) if(version != 0 && (version < 810 || version > 982))
stdext::throw_exception(stdext::format("Client version %d not supported", version)); stdext::throw_exception(stdext::format("Client version %d not supported", version));
m_clientVersion = version; m_clientVersion = version;

Loading…
Cancel
Save