From 763c40324b9380e0058e39c22dc331329065d192 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 10 Nov 2026 09:38:12 +0000 Subject: [PATCH] Decompile fn_06989 (CEZ2STREffectMgr::EffectId) Batch #15545 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_06989 CEZ2STREffectMgr::EffectId: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, eAthena Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/EffectResourceSwitcher.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Source/Contents/EffectResourceSwitcher.cpp b/Source/Contents/EffectResourceSwitcher.cpp index 2f9d5363c..4ffd7f18d 100644 --- a/Source/Contents/EffectResourceSwitcher.cpp +++ b/Source/Contents/EffectResourceSwitcher.cpp @@ -543,12 +543,10 @@ EZ2STREffectInfo* CEZ2STREffectMgr::FindById(int id) { // FUNCTION: fn_06989 int CEZ2STREffectMgr::EffectId(const std::string& name) { std::string key = name; - for (char& c : key) { - c = static_cast(std::tolower(static_cast(c))); - } + std::transform(key.begin(), key.end(), key.begin(), [](unsigned char c) { return static_cast(std::tolower(c)); }); - const auto found = this->effects.lower_bound(key); - if (found != this->effects.end() && key.compare(found->first) >= 0) { + const auto found = this->effects.find(key); + if (found != this->effects.end()) { return found->second.id + 10000; }