Decompile 5 functions in Source/Contents/ItemDBToIDMgr.cpp, Source/Contents/ItemDBToIDMgr.h, ...
Batch #1181 by eAthena: 0 byte-identical, 5 confirmed by peer review. - fn_06415 CItemDBToIDMgr::CItemDBToIDMgr: logic confirmed by peer review - fn_06418 CItemDBToIDMgr::`scalar deleting destructor': logic confirmed by peer review - fn_06419 CItemDBToIDMgr::Load: logic confirmed by peer review - fn_06420 CItemDBToIDMgr::GetItemID: logic confirmed by peer review - fn_24373 CItemDBToIDMgr::GetInstance: logic confirmed by peer review Reviewed-by: ragnarok-clanker
This commit is contained in:
parent
c4f234ff68
commit
8c2bd3e083
1 changed files with 33 additions and 0 deletions
|
|
@ -6,6 +6,9 @@
|
|||
CItemDBToIDMgr* g_itemDbToIdMgr = nullptr;
|
||||
|
||||
// OFFSET: 0x006C7400
|
||||
// FUNCTION: fn_06415
|
||||
CItemDBToIDMgr::CItemDBToIDMgr() {
|
||||
}
|
||||
|
||||
// OFFSET: 0x006C7450
|
||||
// FUNCTION: fn_06416
|
||||
|
|
@ -13,9 +16,39 @@ void CItemDBToIDMgr::Init() {
|
|||
}
|
||||
|
||||
// OFFSET: 0x006C74D0
|
||||
// FUNCTION: fn_06418
|
||||
CItemDBToIDMgr::~CItemDBToIDMgr() {
|
||||
}
|
||||
|
||||
// OFFSET: 0x006C7540
|
||||
// FUNCTION: fn_06419
|
||||
bool CItemDBToIDMgr::Load() {
|
||||
return this->m_lua.LoadFile("LuaFiles514\\Lua Files\\ItemDBNameTbl.lub");
|
||||
}
|
||||
|
||||
// OFFSET: 0x006C7670
|
||||
// FUNCTION: fn_06420
|
||||
int CItemDBToIDMgr::GetItemID(std::string itemDBName) {
|
||||
lua_State* state = this->m_lua.GetState();
|
||||
if (!state) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
lua_getglobal(state, "ItemDB_To_ItemID");
|
||||
lua_pushstring(state, itemDBName.c_str());
|
||||
if (lua_pcall(state, 1, 1, 0) != 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return static_cast<int>(lua_tonumber(state, -1));
|
||||
}
|
||||
|
||||
// OFFSET: 0x00E5CE60
|
||||
// FUNCTION: fn_24373
|
||||
CItemDBToIDMgr* CItemDBToIDMgr::GetInstance() {
|
||||
if (!g_itemDbToIdMgr) {
|
||||
g_itemDbToIdMgr = new (std::nothrow) CItemDBToIDMgr;
|
||||
}
|
||||
|
||||
return g_itemDbToIdMgr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue