Replace tabs with spaces

This commit is contained in:
Joseph Bingham 2016-11-07 23:58:42 -05:00
parent 344146ba2d
commit 5a5adc4ed6
3 changed files with 50 additions and 48 deletions

View File

@ -134,8 +134,8 @@ public:
void addPosition(const OutputMessagePtr& msg, const Position& position); void addPosition(const OutputMessagePtr& msg, const Position& position);
private: private:
void parseStoreButtonIndicators(const InputMessagePtr& msg); void parseStoreButtonIndicators(const InputMessagePtr& msg);
void parseSetStoreDeepLink(const InputMessagePtr& msg); void parseSetStoreDeepLink(const InputMessagePtr& msg);
void parseStore(const InputMessagePtr& msg); void parseStore(const InputMessagePtr& msg);
void parseStoreError(const InputMessagePtr& msg); void parseStoreError(const InputMessagePtr& msg);
void parseStoreTransactionHistory(const InputMessagePtr& msg); void parseStoreTransactionHistory(const InputMessagePtr& msg);

View File

@ -381,11 +381,13 @@ void ProtocolGame::parseMessage(const InputMessagePtr& msg)
case Proto::GameServerStore: case Proto::GameServerStore:
parseStore(msg); parseStore(msg);
break; break;
// PROTOCOL>=1097 // PROTOCOL>=1097
case Proto::GameServerStoreButtonIndicators: case Proto::GameServerStoreButtonIndicators:
break; parseStoreButtonIndicators(msg);
case Proto::GameServerSetStoreDeepLink: break;
break; case Proto::GameServerSetStoreDeepLink:
parseSetStoreDeepLink(msg);
break;
// otclient ONLY // otclient ONLY
case Proto::GameServerExtendedOpcode: case Proto::GameServerExtendedOpcode:
parseExtendedOpcode(msg); parseExtendedOpcode(msg);
@ -461,13 +463,13 @@ void ProtocolGame::parseEnterGame(const InputMessagePtr& msg)
void ProtocolGame::parseStoreButtonIndicators(const InputMessagePtr& msg) void ProtocolGame::parseStoreButtonIndicators(const InputMessagePtr& msg)
{ {
msg->getU8(); // unknown msg->getU8(); // unknown
msg->getU8(); // unknown msg->getU8(); // unknown
} }
void ProtocolGame::parseSetStoreDeepLink(const InputMessagePtr& msg) void ProtocolGame::parseSetStoreDeepLink(const InputMessagePtr& msg)
{ {
int currentlyFeaturedServiceType = msg->getU8(); int currentlyFeaturedServiceType = msg->getU8();
} }
void ProtocolGame::parseBlessings(const InputMessagePtr& msg) void ProtocolGame::parseBlessings(const InputMessagePtr& msg)
@ -550,14 +552,14 @@ void ProtocolGame::parseCompleteStorePurchase(const InputMessagePtr& msg)
void ProtocolGame::parseStoreTransactionHistory(const InputMessagePtr &msg) void ProtocolGame::parseStoreTransactionHistory(const InputMessagePtr &msg)
{ {
int currentPage; int currentPage;
if (g_game.getClientVersion() <= 1096) { if (g_game.getClientVersion() <= 1096) {
currentPage = msg->getU16(); currentPage = msg->getU16();
bool hasNextPage = msg->getU8() == 1; bool hasNextPage = msg->getU8() == 1;
} else { } else {
currentPage = msg->getU32(); currentPage = msg->getU32();
int pageCount = msg->getU32(); int pageCount = msg->getU32();
} }
int entries = msg->getU8(); int entries = msg->getU8();
for(int i = 0; i < entries; i++) { for(int i = 0; i < entries; i++) {
@ -581,10 +583,10 @@ void ProtocolGame::parseStoreOffers(const InputMessagePtr& msg)
int price = msg->getU32(); int price = msg->getU32();
int highlightState = msg->getU8(); 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 saleValidUntilTimestamp = msg->getU32();
int basePrice = msg->getU32(); int basePrice = msg->getU32();
} }
int disabledState = msg->getU8(); int disabledState = msg->getU8();
std::string disabledReason = ""; std::string disabledReason = "";
@ -1295,9 +1297,9 @@ void ProtocolGame::parsePremiumTrigger(const InputMessagePtr& msg)
triggers.push_back(msg->getU8()); triggers.push_back(msg->getU8());
} }
if (g_game.getClientVersion() <= 1096) { if (g_game.getClientVersion() <= 1096) {
bool something = msg->getU8() == 1; bool something = msg->getU8() == 1;
} }
} }
void ProtocolGame::parsePlayerInfo(const InputMessagePtr& msg) void ProtocolGame::parsePlayerInfo(const InputMessagePtr& msg)
@ -1350,15 +1352,15 @@ void ProtocolGame::parsePlayerStats(const InputMessagePtr& msg)
double levelPercent = msg->getU8(); double levelPercent = msg->getU8();
if(g_game.getFeature(Otc::GameExperienceBonus)) if(g_game.getFeature(Otc::GameExperienceBonus))
if (g_game.getClientVersion() <= 1096) { if (g_game.getClientVersion() <= 1096) {
double experienceBonus = msg->getDouble(); double experienceBonus = msg->getDouble();
} else { } else {
int baseXpGain = msg->getU16(); int baseXpGain = msg->getU16();
int voucherAddend = msg->getU16(); int voucherAddend = msg->getU16();
int grindingAddend = msg->getU16(); int grindingAddend = msg->getU16();
int storeBoostAddend = msg->getU16(); int storeBoostAddend = msg->getU16();
int huntingBoostFactor = msg->getU16(); int huntingBoostFactor = msg->getU16();
} }
double mana; double mana;
double maxMana; double maxMana;
@ -1394,13 +1396,13 @@ void ProtocolGame::parsePlayerStats(const InputMessagePtr& msg)
regeneration = msg->getU16(); regeneration = msg->getU16();
double training = 0; double training = 0;
if (g_game.getFeature(Otc::GameOfflineTrainingTime)) { if (g_game.getFeature(Otc::GameOfflineTrainingTime)) {
training = msg->getU16(); training = msg->getU16();
if (g_game.getClientVersion() >= 1097) { if (g_game.getClientVersion() >= 1097) {
int remainingStoreXpBoostSeconds = msg->getU16(); int remainingStoreXpBoostSeconds = msg->getU16();
bool canBuyMoreStoreXpBoosts = msg->getU8(); bool canBuyMoreStoreXpBoosts = msg->getU8();
} }
} }
m_localPlayer->setHealth(health, maxHealth); m_localPlayer->setHealth(health, maxHealth);
m_localPlayer->setFreeCapacity(freeCapacity); m_localPlayer->setFreeCapacity(freeCapacity);

View File

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