From 2d080c719e73ac3299e320643f85143aedd36566 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 6 Nov 2026 14:59:07 +0000 Subject: [PATCH] Decompile fn_18786 (EffectLists::RegisterAllocators) Batch #12581 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_18786 EffectLists::RegisterAllocators: logic confirmed by peer review Peer-reviewed-by: gordaoprogramas, cremane, codeplay Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/Effects/EffectLists.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/Contents/Effects/EffectLists.cpp b/Source/Contents/Effects/EffectLists.cpp index 2799effc..9006deca 100644 --- a/Source/Contents/Effects/EffectLists.cpp +++ b/Source/Contents/Effects/EffectLists.cpp @@ -463,6 +463,7 @@ public: template struct CEffectAllocator : CAllocator { + CEffectAllocator() {} CEffect* Create() override; }; @@ -5024,9 +5025,11 @@ bool EffectLists::RegisterAllocators() { return false; } - std::vector ez2strEffects = CEZ2STREffectMgr::GetInstance()->EffectIds(); - for (int id : ez2strEffects) { - this->RegisterAllocator(id, new (std::nothrow) CEffectAllocator); + { + std::vector ez2strEffects = CEZ2STREffectMgr::GetInstance()->EffectIds(); + for (auto id = ez2strEffects.begin(); id != ez2strEffects.end(); ++id) { + this->RegisterAllocator(*id, new (std::nothrow) CEffectAllocator); + } } if (!this->RegisterAllocator(EF_UNK_2348, new (std::nothrow) CEffectAllocator)) {