commit
62d2a22ab8
|
@ -55,7 +55,7 @@ function g_game.getSupportedClients()
|
||||||
970, 972, 973, 980, 981, 982, 983,
|
970, 972, 973, 980, 981, 982, 983,
|
||||||
984, 985, 986, 1001, 1002, 1010,
|
984, 985, 986, 1001, 1002, 1010,
|
||||||
1020, 1021, 1022, 1031, 1034, 1035,
|
1020, 1021, 1022, 1031, 1034, 1035,
|
||||||
1036, 1037
|
1036, 1037, 1038, 1039, 1040, 1041
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -388,6 +388,7 @@ namespace Otc
|
||||||
GameCreatureIcons = 54,
|
GameCreatureIcons = 54,
|
||||||
GameHideNpcNames = 55,
|
GameHideNpcNames = 55,
|
||||||
GameSpritesAlphaChannel = 56,
|
GameSpritesAlphaChannel = 56,
|
||||||
|
GamePremiumExpiration = 57,
|
||||||
|
|
||||||
LastGameFeature = 101
|
LastGameFeature = 101
|
||||||
};
|
};
|
||||||
|
|
|
@ -1459,7 +1459,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 < 760 || version > 1037))
|
if(version != 0 && (version < 760 || version > 1041))
|
||||||
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();
|
||||||
|
@ -1572,6 +1572,10 @@ void Game::setProtocolVersion(int version)
|
||||||
enableFeature(Otc::GameHideNpcNames);
|
enableFeature(Otc::GameHideNpcNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(version >= 1041) {
|
||||||
|
enableFeature(Otc::GamePremiumExpiration);
|
||||||
|
}
|
||||||
|
|
||||||
m_protocolVersion = version;
|
m_protocolVersion = version;
|
||||||
|
|
||||||
Proto::buildMessageModesMap(version);
|
Proto::buildMessageModesMap(version);
|
||||||
|
@ -1587,7 +1591,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 < 760 || version > 1037))
|
if(version != 0 && (version < 760 || version > 1041))
|
||||||
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;
|
||||||
|
|
|
@ -1022,6 +1022,8 @@ void ProtocolGame::parsePlayerInfo(const InputMessagePtr& msg)
|
||||||
{
|
{
|
||||||
bool premium = msg->getU8(); // premium
|
bool premium = msg->getU8(); // premium
|
||||||
int vocation = msg->getU8(); // vocation
|
int vocation = msg->getU8(); // vocation
|
||||||
|
if(g_game.getFeature(Otc::GamePremiumExpiration))
|
||||||
|
int premiumEx = msg->getU32(); // premium expiration
|
||||||
|
|
||||||
int spellCount = msg->getU16();
|
int spellCount = msg->getU16();
|
||||||
std::vector<int> spells;
|
std::vector<int> spells;
|
||||||
|
|
Loading…
Reference in New Issue