#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 ServerDataWrap
|
{
|
public static void __Register(RealStatePtr L)
|
{
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
System.Type type = typeof(ServerData);
|
Utils.BeginObjectRegister(type, L, translator, 0, 0, 13, 13);
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "region_flag", _g_get_region_flag);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "name", _g_get_name);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "running_status", _g_get_running_status);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "statue", _g_get_statue);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "is_recommend", _g_get_is_recommend);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "region_domain", _g_get_region_domain);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "login_port", _g_get_login_port);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "game_port", _g_get_game_port);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "start_date", _g_get_start_date);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "job", _g_get_job);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "roleid", _g_get_roleid);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "level", _g_get_level);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "last_login_time", _g_get_last_login_time);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "region_flag", _s_set_region_flag);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "name", _s_set_name);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "running_status", _s_set_running_status);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "statue", _s_set_statue);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "is_recommend", _s_set_is_recommend);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "region_domain", _s_set_region_domain);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "login_port", _s_set_login_port);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "game_port", _s_set_game_port);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "start_date", _s_set_start_date);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "job", _s_set_job);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "roleid", _s_set_roleid);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "level", _s_set_level);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "last_login_time", _s_set_last_login_time);
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
null, null, null);
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 3, 0, 0);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "Compare", _m_Compare_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "LastLoginTimeCompare", _m_LastLoginTimeCompare_xlua_st_);
|
|
|
|
|
|
|
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) == 2 && translator.Assignable<LoginSeverListConfig>(L, 2))
|
{
|
LoginSeverListConfig _config = (LoginSeverListConfig)translator.GetObject(L, 2, typeof(LoginSeverListConfig));
|
|
ServerData gen_ret = new ServerData(_config);
|
translator.Push(L, gen_ret);
|
|
return 1;
|
}
|
|
if (LuaAPI.lua_gettop(L) == 1)
|
{
|
translator.Push(L, default(ServerData));
|
return 1;
|
}
|
|
}
|
catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return LuaAPI.luaL_error(L, "invalid arguments to ServerData constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_Compare_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
{
|
ServerData __lhs;translator.Get(L, 1, out __lhs);
|
ServerData __rhs;translator.Get(L, 2, out __rhs);
|
|
int gen_ret = ServerData.Compare( __lhs, __rhs );
|
LuaAPI.xlua_pushinteger(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_LastLoginTimeCompare_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
{
|
ServerData __lhs;translator.Get(L, 1, out __lhs);
|
ServerData __rhs;translator.Get(L, 2, out __rhs);
|
|
int gen_ret = ServerData.LastLoginTimeCompare( __lhs, __rhs );
|
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_region_flag(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.region_flag);
|
} 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);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
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_running_status(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.running_status);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_statue(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.statue);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_is_recommend(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.is_recommend);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_region_domain(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.region_domain);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_login_port(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.login_port);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_game_port(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.game_port);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_start_date(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
translator.Push(L, gen_to_be_invoked.start_date);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_job(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.job);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_roleid(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.roleid);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_level(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.level);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_last_login_time(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
translator.Push(L, gen_to_be_invoked.last_login_time);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_region_flag(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
gen_to_be_invoked.region_flag = LuaAPI.xlua_tointeger(L, 2);
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_name(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
gen_to_be_invoked.name = LuaAPI.lua_tostring(L, 2);
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_running_status(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
gen_to_be_invoked.running_status = LuaAPI.xlua_tointeger(L, 2);
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_statue(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
gen_to_be_invoked.statue = LuaAPI.xlua_tointeger(L, 2);
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_is_recommend(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
gen_to_be_invoked.is_recommend = LuaAPI.xlua_tointeger(L, 2);
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_region_domain(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
gen_to_be_invoked.region_domain = LuaAPI.lua_tostring(L, 2);
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_login_port(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
gen_to_be_invoked.login_port = LuaAPI.xlua_tointeger(L, 2);
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_game_port(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
gen_to_be_invoked.game_port = LuaAPI.xlua_tointeger(L, 2);
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_start_date(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
System.DateTime gen_value;translator.Get(L, 2, out gen_value);
|
gen_to_be_invoked.start_date = gen_value;
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_job(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
gen_to_be_invoked.job = LuaAPI.lua_tostring(L, 2);
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_roleid(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
gen_to_be_invoked.roleid = LuaAPI.lua_tostring(L, 2);
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_level(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
gen_to_be_invoked.level = LuaAPI.xlua_tointeger(L, 2);
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_last_login_time(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
ServerData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
System.DateTime gen_value;translator.Get(L, 2, out gen_value);
|
gen_to_be_invoked.last_login_time = gen_value;
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
|
|
|
|
}
|
}
|