From 47179e39720138f67220b8e0d82413a234e9ef9e Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 17:52:55 +0000 Subject: [PATCH] Decompile 2 functions in Source/Contents/Items/RuneSystem.cpp Batch #5908 by ntrl: 0 byte-identical, 2 confirmed by peer review. - fn_08153 CRuneSystemMgr::UpdateOwnedDecomItems: logic confirmed by peer review - fn_08155 CRuneSystemMgr::SetCurRuneSet: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, superintelligence, KWDev, eAthena, youko, Snow Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/Items/RuneSystem.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/Source/Contents/Items/RuneSystem.cpp b/Source/Contents/Items/RuneSystem.cpp index 148927de0..dc87c4264 100644 --- a/Source/Contents/Items/RuneSystem.cpp +++ b/Source/Contents/Items/RuneSystem.cpp @@ -25,15 +25,11 @@ namespace EquipmentProperties { class CEquipmentPropertiesMgr { public: static CEquipmentPropertiesMgr* GetInstance(); - void sub_6B6E10(const int* param1, const int* param2); - void sub_6B6AF0(const int* param1, const int* param2, int param3); + void RemoveExpansion(const int& kind, const int& itemId); + void AddExpansion(const int& kind, const int& itemId, bool notify); }; } -struct SessionMessengerContext { - int GetList0Size() const; -}; - // GLOBAL: gl_24845 CRuneSystemMgr* g_runeSystemMgr; @@ -724,8 +720,7 @@ int CRuneSystemMgr::SendRequest(int packetId, RuneData* rune, int value) { // FUNCTION: fn_08153 int CRuneSystemMgr::UpdateOwnedDecomItems() { this->m_ownedDecomItems.clear(); - const auto* session = reinterpret_cast(&g_session); - for (int i = 0; i < session->GetList0Size(); ++i) { + for (int i = 0; i < static_cast(g_session.m_inventoryItems.size()); ++i) { ITEM_INFO item = g_session.GetInventoryItemAt(i); if (this->m_itemDecoms.find(std::atoi(item.itemId.c_str())) != this->m_itemDecoms.end()) { this->m_ownedDecomItems.push_back(std::atoi(item.itemId.c_str())); @@ -749,7 +744,7 @@ void CRuneSystemMgr::SetCurRuneSet(int tagId, int runeSetId, int grade, int slot if (this->m_curRuneSet->m_id != runeSetId) { EquipmentProperties::CEquipmentPropertiesMgr* mgr = EquipmentProperties::CEquipmentPropertiesMgr::GetInstance(); const int one = 1; - mgr->sub_6B6E10(&one, &oldId); + mgr->RemoveExpansion(one, oldId); } } @@ -777,7 +772,7 @@ void CRuneSystemMgr::SetCurRuneSet(int tagId, int runeSetId, int grade, int slot if (oldId != runeSetId) { EquipmentProperties::CEquipmentPropertiesMgr* mgr = EquipmentProperties::CEquipmentPropertiesMgr::GetInstance(); const int one = 1; - mgr->sub_6B6AF0(&one, &runeSetId, 0); + mgr->AddExpansion(one, runeSetId, false); } } }