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.
68 lines
1.5 KiB
C++
68 lines
1.5 KiB
C++
#include "UI/Cooldowns/CooldownOwner.h"
|
|
|
|
// INLINED
|
|
CooldownOwner::CooldownOwner() : m_initialized(false) {
|
|
this->m_drawing.normal.clear();
|
|
this->m_drawing.reverse.clear();
|
|
this->m_values.clear();
|
|
this->m_initialized = true;
|
|
}
|
|
|
|
// INLINED
|
|
CooldownOwner::~CooldownOwner() {
|
|
this->m_drawing.normal.clear();
|
|
this->m_drawing.reverse.clear();
|
|
this->m_values.clear();
|
|
}
|
|
|
|
// OFFSET: 0x00CA61A0
|
|
// FUNCTION: fn_20957
|
|
void CooldownOwner::Register(unsigned id, std::uint32_t duration, std::uint32_t start, std::uint32_t elapsed) {
|
|
this->Remove(id);
|
|
this->m_values.insert(std::make_pair(id, CooldownState(0, 0, 0, duration, start, elapsed, 1)));
|
|
}
|
|
|
|
// OFFSET: 0x00CA64B0
|
|
// FUNCTION: fn_20959
|
|
void CooldownOwner::ClearReverseCommands() {
|
|
this->m_drawing.reverse.clear();
|
|
}
|
|
|
|
// INLINED
|
|
CooldownState* CooldownOwner::Find(unsigned id) {
|
|
const auto entry = this->m_values.find(id);
|
|
return entry == this->m_values.end() ? nullptr : &entry->second;
|
|
}
|
|
|
|
// INLINED
|
|
void CooldownOwner::Erase(unsigned id) {
|
|
this->m_values.erase(id);
|
|
}
|
|
|
|
// STATIC: 0x0171DD1C
|
|
// GLOBAL: gl_24487
|
|
CooldownOwner* g_cooldownOwner = nullptr;
|
|
|
|
|
|
// OFFSET: 0x00CA64C0
|
|
// FUNCTION: fn_20960
|
|
bool CreateCooldownOwner() {
|
|
if (g_cooldownOwner) {
|
|
return false;
|
|
}
|
|
|
|
g_cooldownOwner = new (std::nothrow) CooldownOwner;
|
|
if (!g_cooldownOwner) {
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
// OFFSET: 0x00CA6610
|
|
// FUNCTION: fn_20961
|
|
void DestroyCooldownOwner() {
|
|
if (g_cooldownOwner) {
|
|
delete g_cooldownOwner;
|
|
g_cooldownOwner = nullptr;
|
|
}
|
|
}
|