rodecomp/Source/Contents/GuildMgr.cpp
ragnarok-clanker bf6a44c117 Group Utility units into subsystem folders and require OFFSET provenance
Move Lexicon*, Text (TextTokens, TextEscapes, Base64), Math/RadialGrid, Hash (MD5, XxHash32) and Cipher (Rijndael, XorBytes) into Source/Utility subfolders; update includes, guards, compile.json and CMakeLists.txt. Backfill // OFFSET: above every standalone // FUNCTION: block (89 IDs, addresses from the symbol database) and make it mandatory in CODING_RULES.md and AGENTS.md. Remove the MatchLexicon cast chain.
2026-10-26 23:41:07 +01:00

54 lines
1,006 B
C++

#include "Contents/GuildMgr.h"
#include "Contents/Emblems/GuildEmblemReqBundle.h"
#include <new>
// GLOBAL: gl_24555
CGuildMgr* g_guildMgr = nullptr;
// INLINED
CGuildMgr::CGuildMgr() : m_reqBundle(nullptr), m_timeout(0xC800) {
this->m_initialized = false;
this->m_reqBundle = new (std::nothrow) CGuildEmblemReqBundle();
if (this->m_reqBundle) {
this->m_initialized = true;
}
}
// INLINED
CGuildMgr::~CGuildMgr() {
if (this->m_reqBundle) {
delete this->m_reqBundle;
this->m_reqBundle = nullptr;
}
}
// OFFSET: 0x0065E290
// FUNCTION: fn_05172
bool CGuildMgr::Create() {
if (g_guildMgr) {
return false;
}
g_guildMgr = new (std::nothrow) CGuildMgr();
if (!g_guildMgr) {
return false;
}
if (!g_guildMgr->m_initialized) {
delete g_guildMgr;
g_guildMgr = nullptr;
return false;
}
return true;
}
// OFFSET: 0x0065E430
// FUNCTION: fn_05173
void CGuildMgr::Destroy() {
if (g_guildMgr) {
delete g_guildMgr;
g_guildMgr = nullptr;
}
}