From dd0fdf9bfbc4348a9972045708330696ae8884c9 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 14:28:57 +0000 Subject: [PATCH] Decompile fn_02972 (CCashEmotionMgr::SetOwnedPack) Batch #18280 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_02972 CCashEmotionMgr::SetOwnedPack: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, cremane, bibinir Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/CashEmotion/CashEmotionMgr.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Source/Contents/CashEmotion/CashEmotionMgr.cpp b/Source/Contents/CashEmotion/CashEmotionMgr.cpp index 765e6c1a7..d1fd31c9c 100644 --- a/Source/Contents/CashEmotion/CashEmotionMgr.cpp +++ b/Source/Contents/CashEmotion/CashEmotionMgr.cpp @@ -1226,12 +1226,7 @@ void CCashEmotionMgr::SetOwnedPack(int packId, unsigned int expiry) { if (owned.end() == std::find(owned.begin(), owned.end(), packId)) { owned.push_back(packId); - auto unowned = this->m_unownedPacks.begin(); - for (; this->m_unownedPacks.end() != unowned; ++unowned) { - if (*unowned == packId) { - break; - } - } + auto unowned = std::find(this->m_unownedPacks.begin(), this->m_unownedPacks.end(), packId); if (this->m_unownedPacks.end() != unowned) { this->m_unownedPacks.erase(unowned);