From 31d3cff4f8c294d8f68c90cf31f5ff3b8a605e70 Mon Sep 17 00:00:00 2001 From: Luan Luciano Date: Tue, 24 Sep 2024 06:24:13 -0300 Subject: [PATCH] update --- modules/gamelib/const.lua | 6 ++++++ src/client/const.h | 7 +++++++ src/client/protocolgameparse.cpp | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/modules/gamelib/const.lua b/modules/gamelib/const.lua index c8fc4a0b91..6cc0d1ac2c 100644 --- a/modules/gamelib/const.lua +++ b/modules/gamelib/const.lua @@ -399,10 +399,16 @@ ChannelEvent = { ResourceTypes = { BANK_BALANCE = 0, GOLD_EQUIPPED = 1, + CURRENCY_EQUIPPED = 2, PREY_WILDCARDS = 10, DAILYREWARD_STREAK = 20, DAILYREWARD_JOKERS = 21, TASK_HUNTING = 50, + FORGE_SLIVER = 71, + FORGE_CORES = 72, + LESSER_GEMS = 81, + REGULAR_GEMS = 82, + GREATER_GEMS = 83, COIN_NORMAL = 90, COIN_TRANSFERRABLE = 91, COIN_AUCTION = 92, diff --git a/src/client/const.h b/src/client/const.h index f3a504f00c..9e4ffc935e 100644 --- a/src/client/const.h +++ b/src/client/const.h @@ -658,10 +658,17 @@ namespace Otc { RESOURCE_BANK_BALANCE = 0, RESOURCE_GOLD_EQUIPPED = 1, + RESOURCE_CURRENCY_EQUIPPED = 2, RESOURCE_PREY_WILDCARDS = 10, RESOURCE_DAILYREWARD_STREAK = 20, RESOURCE_DAILYREWARD_JOKERS = 21, RESOURCE_TASK_HUNTING = 50, + RESOURCE_FORGE_SLIVER = 71, + RESOURCE_FORGE_CORES = 72, + RESOURCE_LESSER_GEMS = 81, + RESOURCE_REGULAR_GEMS = 82, + RESOURCE_GREATER_GEMS = 83, + RESOURCE_WHEEL_OF_DESTINY = 86, RESOURE_COIN_NORMAL = 90, RESOURE_COIN_TRANSFERRABLE = 91, RESOURE_COIN_AUCTION = 92, diff --git a/src/client/protocolgameparse.cpp b/src/client/protocolgameparse.cpp index afdd55059f..165ac03be3 100644 --- a/src/client/protocolgameparse.cpp +++ b/src/client/protocolgameparse.cpp @@ -1473,7 +1473,7 @@ void ProtocolGame::parsePlayerGoods(const InputMessagePtr& msg) const // 12.x NOTE: this u64 is parsed only, because TFS stil sends it, we use resource balance in this protocol uint64_t money = 0; if (g_game.getClientVersion() >= 1281) { - money = m_localPlayer->getResourceBalance(Otc::RESOURCE_BANK_BALANCE) + m_localPlayer->getResourceBalance(Otc::RESOURCE_GOLD_EQUIPPED); + money = m_localPlayer->getTotalMoney(); } else { money = g_game.getClientVersion() >= 973 ? msg->getU64() : msg->getU32(); }