386 lines
14 KiB
C#
386 lines
14 KiB
C#
|
#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 MSG_EquipEquipPartInfoWrap
|
|||
|
{
|
|||
|
public static void __Register(RealStatePtr L)
|
|||
|
{
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
System.Type type = typeof(MSG_Equip.EquipPartInfo);
|
|||
|
Utils.BeginObjectRegister(type, L, translator, 0, 5, 5, 5);
|
|||
|
|
|||
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Send", _m_Send);
|
|||
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Excute", _m_Excute);
|
|||
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ReadMessage", _m_ReadMessage);
|
|||
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "WriteMessage", _m_WriteMessage);
|
|||
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Clear", _m_Clear);
|
|||
|
|
|||
|
|
|||
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "type", _g_get_type);
|
|||
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "washInfo", _g_get_washInfo);
|
|||
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "strengthInfo", _g_get_strengthInfo);
|
|||
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "gemInfo", _g_get_gemInfo);
|
|||
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "equip", _g_get_equip);
|
|||
|
|
|||
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "type", _s_set_type);
|
|||
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "washInfo", _s_set_washInfo);
|
|||
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "strengthInfo", _s_set_strengthInfo);
|
|||
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "gemInfo", _s_set_gemInfo);
|
|||
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "equip", _s_set_equip);
|
|||
|
|
|||
|
|
|||
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
|||
|
null, null, null);
|
|||
|
|
|||
|
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
Utils.EndClassRegister(type, L, translator);
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int __CreateInstance(RealStatePtr L)
|
|||
|
{
|
|||
|
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
if(LuaAPI.lua_gettop(L) == 1)
|
|||
|
{
|
|||
|
|
|||
|
MSG_Equip.EquipPartInfo gen_ret = new MSG_Equip.EquipPartInfo();
|
|||
|
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 MSG_Equip.EquipPartInfo constructor!");
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_Send(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
MSG_Equip.EquipPartInfo gen_to_be_invoked = (MSG_Equip.EquipPartInfo)translator.FastGetCSObj(L, 1);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
|
|||
|
gen_to_be_invoked.Send( );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_Excute(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
MSG_Equip.EquipPartInfo gen_to_be_invoked = (MSG_Equip.EquipPartInfo)translator.FastGetCSObj(L, 1);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
|
|||
|
gen_to_be_invoked.Excute( );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_ReadMessage(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
MSG_Equip.EquipPartInfo gen_to_be_invoked = (MSG_Equip.EquipPartInfo)translator.FastGetCSObj(L, 1);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
int _readPos = LuaAPI.xlua_tointeger(L, 2);
|
|||
|
int _totalCount = LuaAPI.xlua_tointeger(L, 3);
|
|||
|
|
|||
|
gen_to_be_invoked.ReadMessage( ref _readPos, _totalCount );
|
|||
|
LuaAPI.xlua_pushinteger(L, _readPos);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_WriteMessage(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
MSG_Equip.EquipPartInfo gen_to_be_invoked = (MSG_Equip.EquipPartInfo)translator.FastGetCSObj(L, 1);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
int _fieldNumber = LuaAPI.xlua_tointeger(L, 2);
|
|||
|
|
|||
|
int gen_ret = gen_to_be_invoked.WriteMessage( _fieldNumber );
|
|||
|
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_Clear(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
MSG_Equip.EquipPartInfo gen_to_be_invoked = (MSG_Equip.EquipPartInfo)translator.FastGetCSObj(L, 1);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
|
|||
|
gen_to_be_invoked.Clear( );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_type(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
MSG_Equip.EquipPartInfo gen_to_be_invoked = (MSG_Equip.EquipPartInfo)translator.FastGetCSObj(L, 1);
|
|||
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.type);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_washInfo(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
MSG_Equip.EquipPartInfo gen_to_be_invoked = (MSG_Equip.EquipPartInfo)translator.FastGetCSObj(L, 1);
|
|||
|
translator.Push(L, gen_to_be_invoked.washInfo);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_strengthInfo(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
MSG_Equip.EquipPartInfo gen_to_be_invoked = (MSG_Equip.EquipPartInfo)translator.FastGetCSObj(L, 1);
|
|||
|
translator.Push(L, gen_to_be_invoked.strengthInfo);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_gemInfo(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
MSG_Equip.EquipPartInfo gen_to_be_invoked = (MSG_Equip.EquipPartInfo)translator.FastGetCSObj(L, 1);
|
|||
|
translator.Push(L, gen_to_be_invoked.gemInfo);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_equip(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
MSG_Equip.EquipPartInfo gen_to_be_invoked = (MSG_Equip.EquipPartInfo)translator.FastGetCSObj(L, 1);
|
|||
|
translator.Push(L, gen_to_be_invoked.equip);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _s_set_type(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
MSG_Equip.EquipPartInfo gen_to_be_invoked = (MSG_Equip.EquipPartInfo)translator.FastGetCSObj(L, 1);
|
|||
|
gen_to_be_invoked.type = LuaAPI.xlua_tointeger(L, 2);
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _s_set_washInfo(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
MSG_Equip.EquipPartInfo gen_to_be_invoked = (MSG_Equip.EquipPartInfo)translator.FastGetCSObj(L, 1);
|
|||
|
gen_to_be_invoked.washInfo = (System.Collections.Generic.List<MSG_Equip.EquipWashInfo>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<MSG_Equip.EquipWashInfo>));
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _s_set_strengthInfo(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
MSG_Equip.EquipPartInfo gen_to_be_invoked = (MSG_Equip.EquipPartInfo)translator.FastGetCSObj(L, 1);
|
|||
|
gen_to_be_invoked.strengthInfo = (MSG_Equip.EquipStrengthInfo)translator.GetObject(L, 2, typeof(MSG_Equip.EquipStrengthInfo));
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _s_set_gemInfo(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
MSG_Equip.EquipPartInfo gen_to_be_invoked = (MSG_Equip.EquipPartInfo)translator.FastGetCSObj(L, 1);
|
|||
|
gen_to_be_invoked.gemInfo = (MSG_Equip.gemPartInfo)translator.GetObject(L, 2, typeof(MSG_Equip.gemPartInfo));
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _s_set_equip(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
MSG_Equip.EquipPartInfo gen_to_be_invoked = (MSG_Equip.EquipPartInfo)translator.FastGetCSObj(L, 1);
|
|||
|
gen_to_be_invoked.equip = (MSG_backpack.ItemInfo)translator.GetObject(L, 2, typeof(MSG_backpack.ItemInfo));
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
}
|