rodecomp/Source/UI/Cooldowns/CooldownOwner.h
ragnarok-clanker fec919b88e Maintenance: Link-completeness fixes so the whole client links into one executable (all units in data/compile.json plus exe-only thir
Batch #13186 by ragnarok-clanker: forced by an admin (40 lower score(s), 206 changed function(s)); checked with 620 compiled unit(s), including every includer of Source/Archive/GPak.h, Source/Client/Mode/CGameMode.h, Source/Client/Mode/CLoginMode.h, Source/Client/Session.h, Source/Client/Stove/StoveMgr.h, Source/Client/Stove/StovePCSDK.h, Source/Client/Timer.h, Source/Contents/Actors/GameActor.h, Source/Contents/Actors/RenderObject.h, Source/Contents/CashEmotionMgr.h, Source/Contents/Configuration/ServiceOptions.h, Source/Contents/Skills/SkillTreeScript.h, Source/Render/DX9/D3DX9Runtime.h, Source/Resource/GifResource.h, Source/UI/AdventureGuide/UIAdventureGuide.h, Source/UI/Cooldowns/CooldownOwner.h, Source/UI/Edit/UIEditBoxEx.h, Source/UI/Lists/UIListBoxTemplate.h, Source/UI/Quest/UIRenewQuestUI.h, Source/UI/Rodex/UIRodexComposeWnd.h, Source/UI/Text/UITextViewerControl.h, Source/UI/UIBroadcastBalloon.h, Source/UI/UICaptchaRegisterWnd.h, Source/UI/UIMacroDetectorWnd.h, Source/UI/UIReputeWnd.h, Source/UI/Window/UIRegisterMgr.h, Source/UI/Window/UISecondCostumeWnd.h, Source/UI/Window/UISelCharForUServerWnd.h, Source/UI/Window/UIWindow.h, Source/UI/Window/UIWindowMgr.h, Source/Utility/EncryptedName.h.
2026-11-06 10:56:48 +00:00

43 lines
1,014 B
C++

#ifndef RAGNAROK_SOURCE_UI_COOLDOWNS_COOLDOWNOWNER_H
#define RAGNAROK_SOURCE_UI_COOLDOWNS_COOLDOWNOWNER_H
#include "UI/Cooldowns/CooldownDrawing.h"
#include <map>
class CooldownOwner {
public:
CooldownOwner();
__declspec(noinline) ~CooldownOwner();
void Register(unsigned id, std::uint32_t duration, std::uint32_t start, std::uint32_t elapsed);
void ClearReverseCommands();
CooldownState* Find(unsigned id);
void Erase(unsigned id);
// INLINED
void Remove(unsigned id) {
const auto entry = this->m_values.find(id);
if (entry != this->m_values.end()) {
this->m_values.erase(entry);
}
}
// INLINED
CooldownDrawing& Drawing() {
return this->m_drawing;
}
private:
/* 0000 */ bool m_initialized;
/* 0004 */ CooldownDrawing m_drawing;
/* 001C */ std::map<unsigned, CooldownState> m_values;
};
extern CooldownOwner* g_cooldownOwner;
void DestroyCooldownOwner();
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(CooldownOwner) == 36);
#endif
#endif