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:
parent
ac2249cef5
commit
5056537cdf
3 changed files with 23 additions and 0 deletions
21
Source/Contents/GuildEmblemLookup.cpp
Normal file
21
Source/Contents/GuildEmblemLookup.cpp
Normal 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;
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -341,6 +341,7 @@
|
|||
"Source/Contents/Ground/TerrainHeight.cpp": 4,
|
||||
"Source/Contents/Ground/TerrainPicking.cpp": 4,
|
||||
"Source/Contents/Ground/TerrainPlane.cpp": 4,
|
||||
"Source/Contents/GuildEmblemLookup.cpp": 4,
|
||||
"Source/Contents/GuildEmblemState.cpp": 4,
|
||||
"Source/Contents/GuildMgr.cpp": 4,
|
||||
"Source/Contents/HeadResources.cpp": 4,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue