diff --git a/modules/game_cyclopedia/cyclopedia_widgets.otui b/modules/game_cyclopedia/cyclopedia_widgets.otui index c395347d9..c6f36db1e 100644 --- a/modules/game_cyclopedia/cyclopedia_widgets.otui +++ b/modules/game_cyclopedia/cyclopedia_widgets.otui @@ -964,6 +964,10 @@ BosstiaryItem < UIWidget !text: tr('Track') text-auto-resize: true color: #C1C1C1 + @onSetup: | + if (g_game.getClientVersion() <= 1320) then + self:hide() + end @onCheckChange: | g_game.sendStatusTrackerBestiary(self:getParent():getId(),self:isChecked()) UICreature diff --git a/src/client/const.h b/src/client/const.h index 7fce38ee2..a4d807f65 100644 --- a/src/client/const.h +++ b/src/client/const.h @@ -663,6 +663,7 @@ namespace Otc RESOURCE_PREY_WILDCARDS = 10, RESOURCE_DAILYREWARD_STREAK = 20, RESOURCE_DAILYREWARD_JOKERS = 21, + RESOURCE_CHARM_POINTS = 30, RESOURCE_TASK_HUNTING = 50, RESOURCE_FORGE_DUST = 70, RESOURCE_FORGE_SLIVER = 71, diff --git a/src/client/protocolgameparse.cpp b/src/client/protocolgameparse.cpp index 61c6384ab..26f6f1f6c 100644 --- a/src/client/protocolgameparse.cpp +++ b/src/client/protocolgameparse.cpp @@ -706,7 +706,10 @@ void ProtocolGame::parseRequestPurchaseData(const InputMessagePtr& msg) void ProtocolGame::parseResourceBalance(const InputMessagePtr& msg) const { const auto type = static_cast(msg->getU8()); - const uint64_t value = msg->getU64(); + const uint64_t value = (type == Otc::RESOURCE_CHARM_POINTS && g_game.getClientVersion() < 1332) + ? msg->getU32() + : msg->getU64(); + m_localPlayer->setResourceBalance(type, value); } @@ -1455,7 +1458,10 @@ void ProtocolGame::parseBosstiaryInfo(const InputMessagePtr& msg) boss.category = msg->getU8(); boss.kills = msg->getU32(); msg->getU8(); - boss.isTrackerActived = msg->getU8(); + boss.isTrackerActived = 0; + if (g_game.getClientVersion() >= 1320) { + boss.isTrackerActived = msg->getU8(); + } bossData.emplace_back(boss); }