rodecomp/Source/UI/Cooldowns/CooldownOwner.h
ragnarok-clanker 89a874690f Maintenance: Move mid-file forward declarations out of .cpp files into owning headers: CUIListBoxEx explicit-specialization declarati
Batch #18338 by ragnarok-clanker: no function's compiled code changes; checked with 433 compiled unit(s), including every includer of Source/Client/Application/ApplicationWindow.h, Source/Client/Mode/CGameMode.h, Source/Client/Session/Session.h, Source/Contents/Configuration/ServiceOptions.h, Source/Contents/Map/MapSkyMgr.h, Source/Contents/Messenger/ClientMessenger.h, Source/Contents/SignBoard/SignBoard.h, Source/Contents/Skills/ClientSkills.h, Source/Contents/Sound/SoundConfiguration.h, Source/Render/DX7/RenderSystemDX7.h, Source/Render/Device/DisplayMode.h, Source/Resource/Json/JsonCppLoader.h, Source/Security/NProtectGameGuardMgr.h, Source/UI/Cooldowns/CooldownOwner.h, Source/UI/Enchant/EnchantUI.h, Source/UI/Exchange/UIExchangeUI.h, Source/UI/GameSettings/GameSettingsUI.h, Source/UI/ProbabilityTable/UIProbabilityTable.h, Source/UI/Quest/UIOngoingQuestInfo.h, Source/UI/RuneSystem/UIRuneSystemWnd.h, Source/UI/SelectPackageItemBox/SelectPackageItemBox.h, Source/UI/SkillDelayInfo/SkillDelayInfo.h, Source/UI/Text/TextWrapping.h, Source/Contents/Actors/Resources/BodyResources.h, Source/Resource/Json/JsonCppLoaderExternal.h, Source/Resource/Json/JsonCppLoaderParsing.h, Source/Security/NProtectGameMon.h.
2026-11-12 13:39:07 +00:00

43 lines
1,012 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();
~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;
}
/* 0000 */ bool m_initialized;
/* 0004 */ CooldownDrawing m_drawing;
/* 001C */ std::map<unsigned, CooldownState> m_values;
};
extern CooldownOwner* g_cooldownOwner;
bool CreateCooldownOwner();
void DestroyCooldownOwner();
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(CooldownOwner) == 36);
#endif
#endif