From 716701c6abaae7c43173ac7328e6b9934a167014 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 28 Oct 2026 22:43:36 +0000 Subject: [PATCH] Decompile fn_18985 (CEffect::RetireIfInactive) Batch #1827 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_18985 CEffect::RetireIfInactive: logic confirmed by peer review Reviewed-by: ragnarok-clanker --- Source/Contents/Effects/Effect.cpp | 13 +++++++++++++ Source/Contents/Effects/Effect.h | 1 + 2 files changed, 14 insertions(+) diff --git a/Source/Contents/Effects/Effect.cpp b/Source/Contents/Effects/Effect.cpp index 0a96215..81a75eb 100644 --- a/Source/Contents/Effects/Effect.cpp +++ b/Source/Contents/Effects/Effect.cpp @@ -1,5 +1,7 @@ #include "Contents/Effects/Effect.h" +#include "Contents/Effects/EffectLists.h" + // OFFSET: 0x00B4DAE0 // FUNCTION: fn_18979 CEffect::CEffect(int value) @@ -24,6 +26,17 @@ void CEffect::AddEvent(int kind, const char* text, int frame, int argument) { this->events.push_back(event); } +// OFFSET: 0x00B4DF90 +// FUNCTION: fn_18985 +bool CEffect::RetireIfInactive() { + if (!this->Slot06()) { + g_effectMgr->Retire(this, 0); + return true; + } + + return false; +} + // OFFSET: 0x00B4E170 // FUNCTION: fn_18988 void CEffect::SetEventFrame(int kind, int frame) { diff --git a/Source/Contents/Effects/Effect.h b/Source/Contents/Effects/Effect.h index e8f24f8..f118a34 100644 --- a/Source/Contents/Effects/Effect.h +++ b/Source/Contents/Effects/Effect.h @@ -55,6 +55,7 @@ public: virtual bool Slot33() = 0; void AddEvent(int kind, const char* text, int frame, int argument); void SetEventFrame(int kind, int frame); + bool RetireIfInactive(); /* 0004 */ int id; /* 0008 */ float position[3];