From 5ead212992f7a40b131ae1d53302e1752cafc337 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 6 Nov 2026 20:38:39 +0000 Subject: [PATCH] Decompile fn_23385 (CSession::FindInventoryIndicesByItemId) Batch #13586 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_23385 CSession::FindInventoryIndicesByItemId: logic confirmed by peer review Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Client/Session.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Client/Session.cpp b/Source/Client/Session.cpp index 7b5699aad..0fca37e18 100644 --- a/Source/Client/Session.cpp +++ b/Source/Client/Session.cpp @@ -897,9 +897,9 @@ std::uint16_t CSession::FindInventoryIndexByItemId(int itemId) { // FUNCTION: fn_23385 std::vector CSession::FindInventoryIndicesByItemId(int itemId, unsigned char identifiedOnly) { std::vector indices; - for (const ITEM_INFO& item : this->m_inventoryItems) { - if (std::atoi(item.itemId.c_str()) == itemId && (identifiedOnly != 1 || item.identified == 1)) { - indices.push_back(static_cast(item.unknown_0000[1])); + for (auto it = this->m_inventoryItems.begin(); it != this->m_inventoryItems.end(); ++it) { + if (std::atoi(it->itemId.c_str()) == itemId && (identifiedOnly != 1 || it->identified == 1)) { + indices.push_back(static_cast(it->unknown_0000[1])); } }