#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 RealmConfigWrap
|
{
|
public static void __Register(RealStatePtr L)
|
{
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
System.Type type = typeof(RealmConfig);
|
Utils.BeginObjectRegister(type, L, translator, 0, 0, 17, 0);
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Lv", _g_get_Lv);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Name", _g_get_Name);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsBigRealm", _g_get_IsBigRealm);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "NeedPoint", _g_get_NeedPoint);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "NeedGood", _g_get_NeedGood);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "NeedNum", _g_get_NeedNum);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "NeedActiveTreasure", _g_get_NeedActiveTreasure);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "AddAttrType", _g_get_AddAttrType);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "AddAttrNum", _g_get_AddAttrNum);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "BossID", _g_get_BossID);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Img", _g_get_Img);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "SitTime", _g_get_SitTime);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Quality", _g_get_Quality);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "FightPower", _g_get_FightPower);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "specialProperty", _g_get_specialProperty);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "effectId", _g_get_effectId);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "requireIconEffect", _g_get_requireIconEffect);
|
|
|
|
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)
|
{
|
|
RealmConfig gen_ret = new RealmConfig();
|
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);
|
|
RealmConfig gen_ret = new RealmConfig(_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 RealmConfig 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);
|
|
RealmConfig gen_ret = RealmConfig.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);
|
|
RealmConfig gen_ret = RealmConfig.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 RealmConfig.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 = RealmConfig.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<RealmConfig> gen_ret = RealmConfig.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 = RealmConfig.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 = RealmConfig.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 RealmConfig.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);
|
|
RealmConfig.Init( _sync );
|
|
|
|
return 0;
|
}
|
if(gen_param_count == 0)
|
{
|
|
RealmConfig.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 RealmConfig.Init!");
|
|
}
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_inited(RealStatePtr L)
|
{
|
try {
|
|
LuaAPI.lua_pushboolean(L, RealmConfig.inited);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_Lv(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
RealmConfig gen_to_be_invoked = (RealmConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Lv);
|
} 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);
|
|
RealmConfig gen_to_be_invoked = (RealmConfig)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_IsBigRealm(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
RealmConfig gen_to_be_invoked = (RealmConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.IsBigRealm);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_NeedPoint(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
RealmConfig gen_to_be_invoked = (RealmConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.NeedPoint);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_NeedGood(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
RealmConfig gen_to_be_invoked = (RealmConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.NeedGood);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_NeedNum(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
RealmConfig gen_to_be_invoked = (RealmConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.NeedNum);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_NeedActiveTreasure(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
RealmConfig gen_to_be_invoked = (RealmConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.NeedActiveTreasure);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_AddAttrType(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
RealmConfig gen_to_be_invoked = (RealmConfig)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.AddAttrType);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_AddAttrNum(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
RealmConfig gen_to_be_invoked = (RealmConfig)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.AddAttrNum);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_BossID(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
RealmConfig gen_to_be_invoked = (RealmConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.BossID);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_Img(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
RealmConfig gen_to_be_invoked = (RealmConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.Img);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_SitTime(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
RealmConfig gen_to_be_invoked = (RealmConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.SitTime);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_Quality(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
RealmConfig gen_to_be_invoked = (RealmConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Quality);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_FightPower(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
RealmConfig gen_to_be_invoked = (RealmConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.FightPower);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_specialProperty(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
RealmConfig gen_to_be_invoked = (RealmConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.specialProperty);
|
} 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);
|
|
RealmConfig gen_to_be_invoked = (RealmConfig)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_requireIconEffect(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
RealmConfig gen_to_be_invoked = (RealmConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.requireIconEffect);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
|
|
|
|
|
|
}
|
}
|