From 499d5b85586e8f449499501fd6227c55162c4336 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 28 Oct 2026 19:44:03 +0000 Subject: [PATCH] Decompile 2 functions in Source/Contents/MonsterResources.cpp, Source/Client/Session.h Batch #1608 by eAthena: 0 byte-identical, 2 confirmed by peer review. - fn_23788 CSession::GetMonsterActName: logic confirmed by peer review - fn_23790 CSession::GetMonsterSprName: logic confirmed by peer review Reviewed-by: ragnarok-clanker Adds to the build: Source/Contents/MonsterResources.cpp --- Source/Client/Session.h | 2 ++ Source/Contents/MonsterResources.cpp | 25 +++++++++++++++++++++++++ data/compile.json | 1 + 3 files changed, 28 insertions(+) create mode 100644 Source/Contents/MonsterResources.cpp diff --git a/Source/Client/Session.h b/Source/Client/Session.h index 1c544d9..4ff707a 100644 --- a/Source/Client/Session.h +++ b/Source/Client/Session.h @@ -164,6 +164,8 @@ public: } void ResetItems2B50(); int GetPetFood(int job); + std::string GetMonsterActName(int job); + std::string GetMonsterSprName(int job); void GetPetIllustName(int job, int, char* buffer); int GetPetJobByEggItem(int eggItemId); const char* GetPetString(int id); diff --git a/Source/Contents/MonsterResources.cpp b/Source/Contents/MonsterResources.cpp new file mode 100644 index 0000000..c4c8dd1 --- /dev/null +++ b/Source/Contents/MonsterResources.cpp @@ -0,0 +1,25 @@ +#include "Client/Session.h" +#include "Resource/ResourceMgr.h" +#include "Utility/Text/FormatString.h" + +#include + +// OFFSET: 0x00E09AB0 +// FUNCTION: fn_23788 +std::string CSession::GetMonsterActName(int job) { + std::string name = FormatOwnedString("몬스터\\%s.act", this->m_jobNamesBegin[job]); + if (!ResourceMgr::Instance().Exists(name.c_str())) { + name = ""; + } + return name; +} + +// OFFSET: 0x00E09DC0 +// FUNCTION: fn_23790 +std::string CSession::GetMonsterSprName(int job) { + std::string name = FormatOwnedString("몬스터\\%s.spr", this->m_jobNamesBegin[job]); + if (!ResourceMgr::Instance().Exists(name.c_str())) { + name = ""; + } + return name; +} diff --git a/data/compile.json b/data/compile.json index 9cf717d..affd49c 100644 --- a/data/compile.json +++ b/data/compile.json @@ -366,6 +366,7 @@ "Source/Contents/Models/ModelRendering.cpp": 3, "Source/Contents/Models/ModelSpatial.cpp": 3, "Source/Contents/Models/ModelTextureAnimation.cpp": 3, + "Source/Contents/MonsterResources.cpp": 4, "Source/Contents/MovementRoute.cpp": 4, "Source/Contents/MovementRouteInterpolation.cpp": 4, "Source/Contents/Movies/BinkMovie.cpp": 3,