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).
This commit is contained in:
ragnarok-clanker 2026-10-30 17:52:55 +00:00
commit 47179e3972

View file

@ -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<const SessionMessengerContext*>(&g_session);
for (int i = 0; i < session->GetList0Size(); ++i) {
for (int i = 0; i < static_cast<int>(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);
}
}
}