From ef315dcbb6f2d87a3a06dfc0a0142333cbce6749 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 10:48:14 +0000 Subject: [PATCH] Decompile fn_23598 (CSession::UnequipItem) Batch #17965 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_23598 CSession::UnequipItem: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, Yommy, bibinir Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/Items/ClientItemLists.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Source/Contents/Items/ClientItemLists.cpp b/Source/Contents/Items/ClientItemLists.cpp index bfe9a7d58..98d0e4986 100644 --- a/Source/Contents/Items/ClientItemLists.cpp +++ b/Source/Contents/Items/ClientItemLists.cpp @@ -1098,12 +1098,7 @@ bool CSession::UnequipItem(int location, std::uint32_t identity) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); if (mode != nullptr) { - auto it = g_activeSkillEffects.begin(); - for (; it != g_activeSkillEffects.end(); ++it) { - if (it->id == 0x2B7) { - break; - } - } + auto it = std::find_if(g_activeSkillEffects.begin(), g_activeSkillEffects.end(), [](const ActiveSkillEffect& effect) { return effect.id == 0x2B7; }); if (it != g_activeSkillEffects.end()) { g_activeSkillEffects.erase(it); }