78 lines
2.4 KiB
C#
78 lines
2.4 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 BFNetErrorCodeWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(BF.NetErrorCode);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
null, null, null);
|
|
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 11, 0, 0);
|
|
|
|
|
|
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ExceptionError", BF.NetErrorCode.ExceptionError);
|
|
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ConnectFailed", BF.NetErrorCode.ConnectFailed);
|
|
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ReceiveBufferError", BF.NetErrorCode.ReceiveBufferError);
|
|
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BeginSendError", BF.NetErrorCode.BeginSendError);
|
|
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "PeerDisconnect", BF.NetErrorCode.PeerDisconnect);
|
|
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "DataParseError", BF.NetErrorCode.DataParseError);
|
|
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "DNSParseDomainNameError", BF.NetErrorCode.DNSParseDomainNameError);
|
|
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ServerRefuseReconnect", BF.NetErrorCode.ServerRefuseReconnect);
|
|
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ServerKickNtfClient", BF.NetErrorCode.ServerKickNtfClient);
|
|
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "OtherDeviceLogin", BF.NetErrorCode.OtherDeviceLogin);
|
|
|
|
|
|
|
|
|
|
Utils.EndClassRegister(type, L, translator);
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int __CreateInstance(RealStatePtr L)
|
|
{
|
|
return LuaAPI.luaL_error(L, "BF.NetErrorCode does not have a constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|