Decompile fn_05174 (CGuildMgr::GetEmblemFilename)

Batch #1892 by ragnarok-clanker: 0 byte-identical, 1 confirmed by peer review.

- fn_05174 CGuildMgr::GetEmblemFilename: logic confirmed by peer review

Reviewed-by: ragnarok-clanker
Adds to the build: Source/Contents/GuildEmblemLookup.cpp
This commit is contained in:
ragnarok-clanker 2026-10-28 23:26:42 +00:00
commit 5056537cdf
3 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,21 @@
#include "Client/Replay.h"
#include "Contents/Emblems/EmblemCache.h"
#include "Contents/Emblems/GuildEmblemReqBundle.h"
#include "Contents/GuildMgr.h"
#include "Resource/ResourceMgr.h"
// OFFSET: 0x0065E450
// FUNCTION: fn_05174
std::string CGuildMgr::GetEmblemFilename(std::uint32_t guildId) {
const auto found = this->m_guilds.find(guildId);
if (found == this->m_guilds.end() || found->second.m_emblemVersion <= 0) {
return std::string();
}
std::string filename = reinterpret_cast<const EmblemCache*>(this)->Filename(guildId, found->second.m_emblemVersion);
if (!ResourceMgr::Instance().Load(filename) && g_replayAnimationScaling == 0) {
this->m_reqBundle->Add(guildId, this->GetEmblemVersion(guildId));
}
return filename;
}

View file

@ -29,6 +29,7 @@ public:
static void Destroy();
int GetEmblemVersion(std::uint32_t guildId) const;
std::string GetEmblemFilename(std::uint32_t guildId);
void SetEmblemVersion(std::uint32_t guildId, int version);
void UpdateEmblemRequests(
CEmblemDataMgr& emblems, std::uint32_t accountId, const std::string& accountName, const char* token16, CConnection& connection, CAsyncWorkMgr& manager