Skip to content

Commit

Permalink
fix: packets cyclopedia 13.10
Browse files Browse the repository at this point in the history
  • Loading branch information
kokekanon committed Dec 10, 2024
1 parent 5c5dc58 commit 4899e93
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions modules/game_cyclopedia/cyclopedia_widgets.otui
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/client/const.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 8 additions & 2 deletions src/client/protocolgameparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,10 @@ void ProtocolGame::parseRequestPurchaseData(const InputMessagePtr& msg)
void ProtocolGame::parseResourceBalance(const InputMessagePtr& msg) const
{
const auto type = static_cast<Otc::ResourceTypes_t>(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);
}

Expand Down Expand Up @@ -1454,7 +1457,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);
}

Expand Down

0 comments on commit 4899e93

Please sign in to comment.