Protocol 10.93

This commit is contained in:
Sam
2016-05-23 02:48:32 +02:00
parent 0dfdb22509
commit 1c09c3770b
7 changed files with 44 additions and 15 deletions

View File

@@ -1409,18 +1409,18 @@ void Game::requestTransactionHistory(int page, int entriesPerPage)
m_protocolGame->sendRequestTransactionHistory(page, entriesPerPage);
}
void Game::requestStoreOffers(const std::string& categoryName)
void Game::requestStoreOffers(const std::string& categoryName, int serviceType)
{
if(!canPerformGameAction())
return;
m_protocolGame->sendRequestStoreOffers(categoryName);
m_protocolGame->sendRequestStoreOffers(categoryName, serviceType);
}
void Game::openStore()
void Game::openStore(int serviceType, const std::string& category)
{
if(!canPerformGameAction())
return;
m_protocolGame->sendOpenStore();
m_protocolGame->sendOpenStore(serviceType, category);
}
void Game::transferCoins(const std::string& recipient, int amount)
@@ -1492,7 +1492,7 @@ void Game::setProtocolVersion(int version)
if(isOnline())
stdext::throw_exception("Unable to change protocol version while online");
if(version != 0 && (version < 740 || version > 1091))
if(version != 0 && (version < 740 || version > 1093))
stdext::throw_exception(stdext::format("Protocol version %d not supported", version));
m_protocolVersion = version;
@@ -1510,7 +1510,7 @@ void Game::setClientVersion(int version)
if(isOnline())
stdext::throw_exception("Unable to change client version while online");
if(version != 0 && (version < 740 || version > 1091))
if(version != 0 && (version < 740 || version > 1093))
stdext::throw_exception(stdext::format("Client version %d not supported", version));
m_features.reset();
@@ -1666,6 +1666,15 @@ void Game::setClientVersion(int version)
enableFeature(Otc::GameIngameStore);
}
if(version >= 1092) {
enableFeature(Otc::GameIngameStoreServiceType);
}
if(version >= 1093) {
enableFeature(Otc::GameIngameStoreHighlights);
}
m_clientVersion = version;
g_lua.callGlobalField("g_game", "onClientVersionChange", version);