rodecomp/Source/Contents/Items/ItemResources.cpp
ragnarok-clanker 823f15d998 Decompile fn_23392 (CSession::SkillDragResource)
Batch #18093 by eAthena: 1 byte-identical, 0 confirmed by peer review.

- fn_23392 CSession::SkillDragResource: byte-identical

Merged automatically: every function is byte-identical to the original.
2026-11-12 09:08:57 +00:00

43 lines
1.2 KiB
C++

#include "Client/Session/Session.h"
#include "Contents/Items/ItemDescription.h"
#include "Contents/Items/ItemResources.h"
#include "Resource/ResourceMgr.h"
#include <cstdlib>
#include <string>
template int std::_Traits_compare<std::char_traits<char>>(const char*, std::size_t, const char*, std::size_t) noexcept;
// INLINED
static const char* ItemResourceName(const char* id, int identified) {
const ITEM_DESC& value = FindItemDescription(std::atoi(id));
return identified != 0 ? value.identifiedResource : value.unidentifiedResource;
}
// OFFSET: 0x00DDDA20
// FUNCTION: fn_23391
const char* CSession::ItemDragResource(const char* id, int identified) {
static std::string resource;
resource = "아이템\\";
if (ItemResourceName(id, identified) == nullptr) {
resource += std::string("사과");
} else {
resource += ItemResourceName(id, identified);
}
return resource.c_str();
}
// OFFSET: 0x00DDDCD0
// FUNCTION: fn_23392
const char* CSession::SkillDragResource(const char* name) {
static std::string resource;
resource = "아이템\\";
resource += name;
if (!ResourceMgr::Instance().Exists((resource + ".act").c_str())) {
resource = "아이템\\am_berserkpitcher";
}
return resource.c_str();
}