#if USE_UNI_LUA
|
using LuaAPI = UniLua.Lua;
|
using RealStatePtr = UniLua.ILuaState;
|
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
#else
|
using LuaAPI = XLua.LuaDLL.Lua;
|
using RealStatePtr = System.IntPtr;
|
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
#endif
|
|
using XLua;
|
using System.Collections.Generic;
|
|
|
namespace XLua.CSObjectWrap
|
{
|
using Utils = XLua.Utils;
|
public class TreasureConfigWrap
|
{
|
public static void __Register(RealStatePtr L)
|
{
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
System.Type type = typeof(TreasureConfig);
|
Utils.BeginObjectRegister(type, L, translator, 0, 0, 22, 0);
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ID", _g_get_ID);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Category", _g_get_Category);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "PreTreasure", _g_get_PreTreasure);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Name", _g_get_Name);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Icon", _g_get_Icon);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "NameIcon", _g_get_NameIcon);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "TreasureNameIcon", _g_get_TreasureNameIcon);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Model", _g_get_Model);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "SourceDescription", _g_get_SourceDescription);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Story", _g_get_Story);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "IndexTitle", _g_get_IndexTitle);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "StoryName", _g_get_StoryName);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "RequirementTotal", _g_get_RequirementTotal);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Achievements", _g_get_Achievements);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "MapId", _g_get_MapId);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "LineId", _g_get_LineId);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ChallengeLevel", _g_get_ChallengeLevel);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "EffectID", _g_get_EffectID);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Verse", _g_get_Verse);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ShowNetGotEffect", _g_get_ShowNetGotEffect);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "PreferredStage", _g_get_PreferredStage);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "UIScale", _g_get_UIScale);
|
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
null, null, null);
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 6, 1, 0);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "Get", _m_Get_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetKeys", _m_GetKeys_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetValues", _m_GetValues_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "Has", _m_Has_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "Init", _m_Init_xlua_st_);
|
|
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "inited", _g_get_inited);
|
|
|
|
Utils.EndClassRegister(type, L, translator);
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int __CreateInstance(RealStatePtr L)
|
{
|
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
if(LuaAPI.lua_gettop(L) == 1)
|
{
|
|
TreasureConfig gen_ret = new TreasureConfig();
|
translator.Push(L, gen_ret);
|
|
return 1;
|
}
|
if(LuaAPI.lua_gettop(L) == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
|
{
|
string _input = LuaAPI.lua_tostring(L, 2);
|
|
TreasureConfig gen_ret = new TreasureConfig(_input);
|
translator.Push(L, gen_ret);
|
|
return 1;
|
}
|
|
}
|
catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return LuaAPI.luaL_error(L, "invalid arguments to TreasureConfig constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_Get_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
if(gen_param_count == 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1))
|
{
|
int _id = LuaAPI.xlua_tointeger(L, 1);
|
|
TreasureConfig gen_ret = TreasureConfig.Get( _id );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
if(gen_param_count == 1&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING))
|
{
|
string _id = LuaAPI.lua_tostring(L, 1);
|
|
TreasureConfig gen_ret = TreasureConfig.Get( _id );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to TreasureConfig.Get!");
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_GetKeys_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
{
|
|
System.Collections.Generic.List<string> gen_ret = TreasureConfig.GetKeys( );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_GetValues_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
{
|
|
System.Collections.Generic.List<TreasureConfig> gen_ret = TreasureConfig.GetValues( );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_Has_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
if(gen_param_count == 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1))
|
{
|
int _id = LuaAPI.xlua_tointeger(L, 1);
|
|
bool gen_ret = TreasureConfig.Has( _id );
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
return 1;
|
}
|
if(gen_param_count == 1&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING))
|
{
|
string _id = LuaAPI.lua_tostring(L, 1);
|
|
bool gen_ret = TreasureConfig.Has( _id );
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to TreasureConfig.Has!");
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_Init_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
if(gen_param_count == 1&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 1))
|
{
|
bool _sync = LuaAPI.lua_toboolean(L, 1);
|
|
TreasureConfig.Init( _sync );
|
|
|
|
return 0;
|
}
|
if(gen_param_count == 0)
|
{
|
|
TreasureConfig.Init( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to TreasureConfig.Init!");
|
|
}
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_inited(RealStatePtr L)
|
{
|
try {
|
|
LuaAPI.lua_pushboolean(L, TreasureConfig.inited);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_ID(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.ID);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_Category(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Category);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_PreTreasure(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.PreTreasure);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_Name(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.Name);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_Icon(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.Icon);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_NameIcon(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.NameIcon);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_TreasureNameIcon(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.TreasureNameIcon);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_Model(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.Model);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_SourceDescription(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.SourceDescription);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_Story(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.Story);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_IndexTitle(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.IndexTitle);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_StoryName(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.StoryName);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_RequirementTotal(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.RequirementTotal);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_Achievements(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.Achievements);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_MapId(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.MapId);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_LineId(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.LineId);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_ChallengeLevel(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.ChallengeLevel);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_EffectID(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.EffectID);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_Verse(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.Verse);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_ShowNetGotEffect(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.ShowNetGotEffect);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_PreferredStage(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.PreferredStage);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_UIScale(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.UIScale);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
|
|
|
|
|
|
}
|
}
|