Merge pull request #771 from jo3bingham/coding-style

Fix inconsistent coding style
This commit is contained in:
Konrad Kuśnierz 2016-11-08 18:57:52 +01:00 committed by GitHub
commit 42e0b0a025
2 changed files with 7 additions and 7 deletions

View File

@ -553,7 +553,7 @@ void ProtocolGame::parseCompleteStorePurchase(const InputMessagePtr& msg)
void ProtocolGame::parseStoreTransactionHistory(const InputMessagePtr &msg)
{
int currentPage;
if (g_game.getClientVersion() <= 1096) {
if(g_game.getClientVersion() <= 1096) {
currentPage = msg->getU16();
bool hasNextPage = msg->getU8() == 1;
} else {
@ -583,7 +583,7 @@ void ProtocolGame::parseStoreOffers(const InputMessagePtr& msg)
int price = msg->getU32();
int highlightState = msg->getU8();
if (highlightState == 2 && g_game.getFeature(Otc::GameIngameStoreHighlights) && g_game.getClientVersion() >= 1097) {
if(highlightState == 2 && g_game.getFeature(Otc::GameIngameStoreHighlights) && g_game.getClientVersion() >= 1097) {
int saleValidUntilTimestamp = msg->getU32();
int basePrice = msg->getU32();
}
@ -1297,7 +1297,7 @@ void ProtocolGame::parsePremiumTrigger(const InputMessagePtr& msg)
triggers.push_back(msg->getU8());
}
if (g_game.getClientVersion() <= 1096) {
if(g_game.getClientVersion() <= 1096) {
bool something = msg->getU8() == 1;
}
}
@ -1352,7 +1352,7 @@ void ProtocolGame::parsePlayerStats(const InputMessagePtr& msg)
double levelPercent = msg->getU8();
if(g_game.getFeature(Otc::GameExperienceBonus))
if (g_game.getClientVersion() <= 1096) {
if(g_game.getClientVersion() <= 1096) {
double experienceBonus = msg->getDouble();
} else {
int baseXpGain = msg->getU16();
@ -1396,9 +1396,9 @@ void ProtocolGame::parsePlayerStats(const InputMessagePtr& msg)
regeneration = msg->getU16();
double training = 0;
if (g_game.getFeature(Otc::GameOfflineTrainingTime)) {
if(g_game.getFeature(Otc::GameOfflineTrainingTime)) {
training = msg->getU16();
if (g_game.getClientVersion() >= 1097) {
if(g_game.getClientVersion() >= 1097) {
int remainingStoreXpBoostSeconds = msg->getU16();
bool canBuyMoreStoreXpBoosts = msg->getU8();
}

View File

@ -880,7 +880,7 @@ void ProtocolGame::sendRequestTransactionHistory(int page, int entriesPerPage)
{
OutputMessagePtr msg(new OutputMessage);
msg->addU8(Proto::ClientRequestTransactionHistory);
if (g_game.getClientVersion() <= 1096) {
if(g_game.getClientVersion() <= 1096) {
msg->addU16(page);
msg->addU32(entriesPerPage);
} else {