From a887f8976d08948eee8f03def72f638e26af2139 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 11:10:34 +0000 Subject: [PATCH] Confirm fn_20961 (DestroyCooldownOwner) Batch #18226 by eAthena: 1 byte-identical, 0 confirmed by peer review. - fn_20961 DestroyCooldownOwner: byte-identical (already on main) Merged automatically: every function is byte-identical to the original. --- Source/UI/Cooldowns/CooldownOwner.cpp | 9 ++++++++- Source/UI/Cooldowns/CooldownOwner.h | 3 +-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Source/UI/Cooldowns/CooldownOwner.cpp b/Source/UI/Cooldowns/CooldownOwner.cpp index cb73dd37b..9d5e91ce5 100644 --- a/Source/UI/Cooldowns/CooldownOwner.cpp +++ b/Source/UI/Cooldowns/CooldownOwner.cpp @@ -1,7 +1,8 @@ #include "UI/Cooldowns/CooldownOwner.h" // INLINED -CooldownOwner::CooldownOwner() : m_initialized(false) { +CooldownOwner::CooldownOwner() { + this->m_initialized = false; this->m_drawing.normal.clear(); this->m_drawing.reverse.clear(); this->m_values.clear(); @@ -56,6 +57,12 @@ bool CreateCooldownOwner() { return false; } + if (!g_cooldownOwner->m_initialized) { + delete g_cooldownOwner; + g_cooldownOwner = nullptr; + return false; + } + return true; } // OFFSET: 0x00CA6610 diff --git a/Source/UI/Cooldowns/CooldownOwner.h b/Source/UI/Cooldowns/CooldownOwner.h index 8f253f52d..2451260bb 100644 --- a/Source/UI/Cooldowns/CooldownOwner.h +++ b/Source/UI/Cooldowns/CooldownOwner.h @@ -8,7 +8,7 @@ class CooldownOwner { public: CooldownOwner(); - __declspec(noinline) ~CooldownOwner(); + ~CooldownOwner(); void Register(unsigned id, std::uint32_t duration, std::uint32_t start, std::uint32_t elapsed); void ClearReverseCommands(); @@ -26,7 +26,6 @@ public: return this->m_drawing; } -private: /* 0000 */ bool m_initialized; /* 0004 */ CooldownDrawing m_drawing; /* 001C */ std::map m_values;