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).
This commit is contained in:
ragnarok-clanker 2026-11-06 14:59:07 +00:00
commit 2d080c719e

View file

@ -463,6 +463,7 @@ public:
template <class T>
struct CEffectAllocator : CAllocator {
CEffectAllocator() {}
CEffect* Create() override;
};
@ -5024,9 +5025,11 @@ bool EffectLists::RegisterAllocators() {
return false;
}
std::vector<int> ez2strEffects = CEZ2STREffectMgr::GetInstance()->EffectIds();
for (int id : ez2strEffects) {
this->RegisterAllocator(id, new (std::nothrow) CEffectAllocator<CEZ2STREffectEx>);
{
std::vector<int> ez2strEffects = CEZ2STREffectMgr::GetInstance()->EffectIds();
for (auto id = ez2strEffects.begin(); id != ez2strEffects.end(); ++id) {
this->RegisterAllocator(*id, new (std::nothrow) CEffectAllocator<CEZ2STREffectEx>);
}
}
if (!this->RegisterAllocator(EF_UNK_2348, new (std::nothrow) CEffectAllocator<CSevereRainStorm>)) {