rodecomp/Source/Script/LuaScript.h
ragnarok-clanker 30fde8b89d Decompile 8 functions in Source/Script/LuaScript.cpp, Source/Script/LuaScript.h, ...
Batch #4398 by Yommy: 0 byte-identical, 8 confirmed by peer review.

- fn_18341 LuaRGB: logic confirmed by peer review
- fn_19248 SetEZ2STRInfo: logic confirmed by peer review
- fn_18356 AddCashshopBanner: logic confirmed by peer review
- fn_18355 AddCashshopBanner2: logic confirmed by peer review
- fn_18357 AddCheckAttendanceBanner: logic confirmed by peer review
- fn_19246 CEmitterEffect::SetTexture: logic confirmed by peer review
- fn_18359 AddIngredientLapineUpgradeBox: logic confirmed by peer review (already on main)
- fn_12736 RegisterLuaKafraServiceMaps: logic confirmed by peer review (already on main)

Peer-reviewed-by: eAthena, superintelligence, KWDev
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-30 02:24:21 +00:00

40 lines
1.1 KiB
C++

#ifndef RAGNAROK_SOURCE_SCRIPT_LUASCRIPT_H
#define RAGNAROK_SOURCE_SCRIPT_LUASCRIPT_H
#include <cstdarg>
#include <cstddef>
#include <cstdint>
#include <list>
#include <string>
struct lua_State;
class LuaScript {
public:
LuaScript();
~LuaScript();
void Open();
bool Call(std::string function, const char* signature, ...);
bool CallTable(std::string table, std::string function, const char* signature, ...);
bool Execute(const void* bytes, std::size_t size);
bool Load(const char* name, bool resourcePath, bool looseOnly);
int GlobalInteger(const char* name);
std::string GlobalString(const char* name);
bool HasTable(const char* name);
std::list<int> TableKeys(const char* name, int unused);
int TableInteger(std::string table, int keyType, std::intptr_t key);
void Close();
void Register(std::string name, int (*function)(lua_State*));
protected:
/* 0000 */ lua_State* m_state;
private:
void Error(const char* caption, const char* format, ...);
bool TableField(const char* signature, ...);
void Register();
};
extern LuaScript* g_luaScript;
#endif