From 8268b2037c9854aaca0a04cb634026ece3d03fba Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 11:28:14 +0000 Subject: [PATCH] Decompile fn_06354 (ToggleSitStand) Batch #17962 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_06354 ToggleSitStand: 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/Configuration/ServiceOptions.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Source/Contents/Configuration/ServiceOptions.cpp b/Source/Contents/Configuration/ServiceOptions.cpp index d43c91782..659973844 100644 --- a/Source/Contents/Configuration/ServiceOptions.cpp +++ b/Source/Contents/Configuration/ServiceOptions.cpp @@ -45,6 +45,7 @@ extern "C" { #include } +#include #include #include #include @@ -900,10 +901,8 @@ void ApplyServiceOption(int id, unsigned char value, bool notify, int enabledMes // OFFSET: 0x006C42B0 // FUNCTION: fn_06354 void ToggleSitStand() { - for (const ActiveSkillEffect& effect : g_activeSkillEffects) { - if (effect.id == 933) { - return; - } + if (std::find_if(g_activeSkillEffects.begin(), g_activeSkillEffects.end(), [](const ActiveSkillEffect& effect) { return effect.id == 933; }) != g_activeSkillEffects.end()) { + return; } CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); @@ -926,7 +925,7 @@ void ToggleSitStand() { times.pop_front(); times.push_back(timeGetTime()); const unsigned long elapsed = times.back() - times.front(); - if (elapsed - 1501 <= 1498) { + if (elapsed > 1500 && elapsed < 3000) { mode->SendMsg(MM_DORIDORI, 0, 0, 0, 0); for (unsigned long& time : times) { time = 0;