rodecomp/Source/Contents/Items/ItemReformMgr.h
ragnarok-clanker 2428139219 Decompile 2 functions in Source/Contents/Items/ItemReformMgr.cpp, Source/Contents/Items/ItemReformMgr.h, ...
Batch #12692 by cremane: 1 byte-identical, 1 confirmed by peer review.

- fn_04074 ItemReformInfo::ItemReformInfo: byte-identical (already on main)
- fn_04085 CItemReformMgr::LoadReformInfo: logic confirmed by peer review

Peer-reviewed-by: Yommy, gordaoprogramas, codeplay
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-06 04:22:43 +00:00

55 lines
1.5 KiB
C++

#ifndef RAGNAROK_SOURCE_CONTENTS_ITEMS_ITEMREFORMMGR_H
#define RAGNAROK_SOURCE_CONTENTS_ITEMS_ITEMREFORMMGR_H
#include "Script/LuaInstance.h"
#include <cstdint>
#include <map>
#include <string>
#include <utility>
#include <vector>
struct ItemReformInfo {
ItemReformInfo();
/* 0000 */ int baseItem;
/* 0004 */ int resultItem;
/* 0008 */ std::map<int, std::uint64_t> materials;
/* 0010 */ std::uint64_t needRefineMin;
/* 0018 */ std::uint64_t needRefineMax;
/* 0020 */ std::uint64_t needOptionNumMin;
/* 0028 */ bool isEmptySocket;
/* 0030 */ std::int64_t changeRefineValue;
/* 0038 */ std::string randomOptionCode;
/* 0050 */ bool preserveSocketItem;
/* 0051 */ bool preserveGrade;
/* 0054 */ std::string informationString;
};
class CItemReformMgr {
public:
CItemReformMgr();
virtual ~CItemReformMgr();
static CItemReformMgr* Instance();
void NullSub();
std::vector<int> GetReformBaseItems(int itemId);
ItemReformInfo* FindReform(int itemId, int baseItem);
bool Load();
bool HasItem(int itemId);
void LoadReformInfo();
void LoadReformItemList();
/* 0004 */ std::map<std::uint64_t, ItemReformInfo> m_reformInfo;
/* 000C */ std::map<int, std::vector<std::uint64_t>> m_reformItemList;
/* 0014 */ CLuaInstance m_lua;
/* 001C */ unsigned int m_maxMaterials;
};
extern CItemReformMgr* g_itemReformMgr;
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(ItemReformInfo) == 0x70);
static_assert(sizeof(CItemReformMgr) == 0x20);
#endif
#endif