From 76bcc6d91b1bb44b0653e9681eb0fb6708bbf464 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 10:44:21 +0000 Subject: [PATCH] Decompile fn_22192 (CGameMode::UpdateActorSpiritCount) Batch #17966 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_22192 CGameMode::UpdateActorSpiritCount: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, Yommy, KWDev Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Client/Mode/GameModePackets.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Source/Client/Mode/GameModePackets.cpp b/Source/Client/Mode/GameModePackets.cpp index 2eda7a3b7..db843d6c6 100644 --- a/Source/Client/Mode/GameModePackets.cpp +++ b/Source/Client/Mode/GameModePackets.cpp @@ -4001,11 +4001,9 @@ void CGameMode::UpdateActorSpiritCount(std::uint32_t aid, std::int16_t count) { if (abyss) { static_cast(abyss)->SetLevel(count); } - for (auto it = g_activeSkillEffects.begin(); it != g_activeSkillEffects.end(); ++it) { - if (it->id == 1244) { - it->value1 = count; - break; - } + auto it = std::find_if(g_activeSkillEffects.begin(), g_activeSkillEffects.end(), [](const ActiveSkillEffect& effect) { return effect.id == 1244; }); + if (it != g_activeSkillEffects.end()) { + it->value1 = count; } return; }