1444 lines
48 KiB
C#
1444 lines
48 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 BFNetManagerWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(BF.NetManager);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 39, 6, 6);
|
|
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Update", _m_Update);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitNetClientCount", _m_InitNetClientCount);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "HandleDecodePbChange", _m_HandleDecodePbChange);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetConnectIP", _m_GetConnectIP);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsConnected", _m_IsConnected);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsDisconnected", _m_IsDisconnected);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsAvailable", _m_IsAvailable);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsClosed", _m_IsClosed);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Reconnect", _m_Reconnect);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetServerTimestamp", _m_GetServerTimestamp);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ConnectWithDomainName", _m_ConnectWithDomainName);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ConnectWithConfiguration", _m_ConnectWithConfiguration);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Send", _m_Send);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Close", _m_Close);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetAuthReqData", _m_GetAuthReqData);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetChatAuthReqData", _m_GetChatAuthReqData);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetLoginReqData", _m_GetLoginReqData);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetDecodeStataus", _m_GetDecodeStataus);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetDecodePbStr", _m_GetDecodePbStr);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetDecodeGroup", _m_GetDecodeGroup);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddLuaOnReceiveMessage", _m_AddLuaOnReceiveMessage);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RemoveLuaOnReceiveMessage", _m_RemoveLuaOnReceiveMessage);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddLuaOnConnected", _m_AddLuaOnConnected);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RemoveLuaOnConnected", _m_RemoveLuaOnConnected);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddLuaOnDisconnected", _m_AddLuaOnDisconnected);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RemoveLuaOnDisconnected", _m_RemoveLuaOnDisconnected);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddLuaOnReconnectSuccess", _m_AddLuaOnReconnectSuccess);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RemoveLuaOnReconnectSuccess", _m_RemoveLuaOnReconnectSuccess);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddLuaOnReconnect", _m_AddLuaOnReconnect);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RemoveLuaOnReconnect", _m_RemoveLuaOnReconnect);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetLuaAuthCallback", _m_SetLuaAuthCallback);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetLuaOnDecodePbCallback", _m_SetLuaOnDecodePbCallback);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RemoveLuaOnDecodePbCallback", _m_RemoveLuaOnDecodePbCallback);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddLuaOnError", _m_AddLuaOnError);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RemoveLuaOnError", _m_RemoveLuaOnError);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RemoveAllLuaCallback", _m_RemoveAllLuaCallback);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Destroy", _m_Destroy);
|
|
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "luaAuthCallback", _e_luaAuthCallback);
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "loginReqData", _g_get_loginReqData);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "authReqData", _g_get_authReqData);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ChatAuthReqData", _g_get_ChatAuthReqData);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "decodePbStr", _g_get_decodePbStr);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "rspGroup", _g_get_rspGroup);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "decodeFinish", _g_get_decodeFinish);
|
|
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "loginReqData", _s_set_loginReqData);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "authReqData", _s_set_authReqData);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "ChatAuthReqData", _s_set_ChatAuthReqData);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "decodePbStr", _s_set_decodePbStr);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "rspGroup", _s_set_rspGroup);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "decodeFinish", _s_set_decodeFinish);
|
|
|
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
null, null, null);
|
|
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 4, 0, 0);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "Create", _m_Create_xlua_st_);
|
|
|
|
|
|
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "MAIN_SOCKET_NAME", BF.NetManager.MAIN_SOCKET_NAME);
|
|
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "CHAT_SOCKET_NAME", BF.NetManager.CHAT_SOCKET_NAME);
|
|
|
|
|
|
|
|
|
|
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)
|
|
{
|
|
|
|
var gen_ret = new BF.NetManager();
|
|
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 BF.NetManager constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Create_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = BF.NetManager.Create( );
|
|
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_Init(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.Init( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Update(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.Update( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_InitNetClientCount(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _count = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
gen_to_be_invoked.InitNetClientCount( _count );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_HandleDecodePbChange(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _clientId = LuaAPI.xlua_tointeger(L, 2);
|
|
uint _group = LuaAPI.xlua_touint(L, 3);
|
|
uint _seq = LuaAPI.xlua_touint(L, 4);
|
|
byte[] _data = LuaAPI.lua_tobytes(L, 5);
|
|
|
|
gen_to_be_invoked.HandleDecodePbChange( _clientId, _group, _seq, _data );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetConnectIP(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _clientId = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.GetConnectIP( _clientId );
|
|
LuaAPI.lua_pushstring(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_IsConnected(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _clientId = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.IsConnected( _clientId );
|
|
LuaAPI.lua_pushboolean(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_IsDisconnected(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _clientId = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.IsDisconnected( _clientId );
|
|
LuaAPI.lua_pushboolean(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_IsAvailable(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _clientId = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.IsAvailable( _clientId );
|
|
LuaAPI.lua_pushboolean(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_IsClosed(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _clientId = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.IsClosed( _clientId );
|
|
LuaAPI.lua_pushboolean(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_Reconnect(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _clientId = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
gen_to_be_invoked.Reconnect( _clientId );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetServerTimestamp(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _clientId = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.GetServerTimestamp( _clientId );
|
|
LuaAPI.lua_pushint64(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_ConnectWithDomainName(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _clientId = LuaAPI.xlua_tointeger(L, 2);
|
|
string _clientName = LuaAPI.lua_tostring(L, 3);
|
|
string _domainName = LuaAPI.lua_tostring(L, 4);
|
|
int _port = LuaAPI.xlua_tointeger(L, 5);
|
|
|
|
gen_to_be_invoked.ConnectWithDomainName( _clientId, _clientName, _domainName, _port );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_ConnectWithConfiguration(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _clientId = LuaAPI.xlua_tointeger(L, 2);
|
|
BF.NetConnectConfiguration _configuration = (BF.NetConnectConfiguration)translator.GetObject(L, 3, typeof(BF.NetConnectConfiguration));
|
|
string _domainName = LuaAPI.lua_tostring(L, 4);
|
|
int _port = LuaAPI.xlua_tointeger(L, 5);
|
|
|
|
gen_to_be_invoked.ConnectWithConfiguration( _clientId, _configuration, _domainName, _port );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Send(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _clientId = LuaAPI.xlua_tointeger(L, 2);
|
|
uint _group = LuaAPI.xlua_touint(L, 3);
|
|
byte _cmd = (byte)LuaAPI.xlua_tointeger(L, 4);
|
|
byte[] _data = LuaAPI.lua_tobytes(L, 5);
|
|
|
|
gen_to_be_invoked.Send( _clientId, _group, _cmd, _data );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Close(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _clientId = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
gen_to_be_invoked.Close( _clientId );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetAuthReqData(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.GetAuthReqData( );
|
|
LuaAPI.lua_pushstring(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_GetChatAuthReqData(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.GetChatAuthReqData( );
|
|
LuaAPI.lua_pushstring(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_GetLoginReqData(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.GetLoginReqData( );
|
|
LuaAPI.lua_pushstring(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_GetDecodeStataus(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.GetDecodeStataus( );
|
|
LuaAPI.lua_pushboolean(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_GetDecodePbStr(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.GetDecodePbStr( );
|
|
LuaAPI.lua_pushstring(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_GetDecodeGroup(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.GetDecodeGroup( );
|
|
LuaAPI.xlua_pushuint(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_AddLuaOnReceiveMessage(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
System.Action<int, uint, uint, byte[]> _luaFunc = translator.GetDelegate<System.Action<int, uint, uint, byte[]>>(L, 2);
|
|
|
|
gen_to_be_invoked.AddLuaOnReceiveMessage( _luaFunc );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_RemoveLuaOnReceiveMessage(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.RemoveLuaOnReceiveMessage( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_AddLuaOnConnected(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
System.Action<int> _luaFunc = translator.GetDelegate<System.Action<int>>(L, 2);
|
|
|
|
gen_to_be_invoked.AddLuaOnConnected( _luaFunc );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_RemoveLuaOnConnected(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.RemoveLuaOnConnected( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_AddLuaOnDisconnected(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
System.Action<int> _luaFunc = translator.GetDelegate<System.Action<int>>(L, 2);
|
|
|
|
gen_to_be_invoked.AddLuaOnDisconnected( _luaFunc );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_RemoveLuaOnDisconnected(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.RemoveLuaOnDisconnected( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_AddLuaOnReconnectSuccess(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
System.Action<int> _luaFunc = translator.GetDelegate<System.Action<int>>(L, 2);
|
|
|
|
gen_to_be_invoked.AddLuaOnReconnectSuccess( _luaFunc );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_RemoveLuaOnReconnectSuccess(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.RemoveLuaOnReconnectSuccess( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_AddLuaOnReconnect(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
System.Action<int> _luaFunc = translator.GetDelegate<System.Action<int>>(L, 2);
|
|
|
|
gen_to_be_invoked.AddLuaOnReconnect( _luaFunc );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_RemoveLuaOnReconnect(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.RemoveLuaOnReconnect( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetLuaAuthCallback(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
System.Action<bool> _callback = translator.GetDelegate<System.Action<bool>>(L, 2);
|
|
|
|
gen_to_be_invoked.SetLuaAuthCallback( _callback );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetLuaOnDecodePbCallback(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
System.Action<int, uint, uint, byte[]> _luaFunc = translator.GetDelegate<System.Action<int, uint, uint, byte[]>>(L, 2);
|
|
|
|
gen_to_be_invoked.SetLuaOnDecodePbCallback( _luaFunc );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_RemoveLuaOnDecodePbCallback(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.RemoveLuaOnDecodePbCallback( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_AddLuaOnError(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
System.Action<int, int, string> _luaFunc = translator.GetDelegate<System.Action<int, int, string>>(L, 2);
|
|
|
|
gen_to_be_invoked.AddLuaOnError( _luaFunc );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_RemoveLuaOnError(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.RemoveLuaOnError( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_RemoveAllLuaCallback(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.RemoveAllLuaCallback( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Destroy(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.Destroy( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_loginReqData(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.loginReqData);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_authReqData(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.authReqData);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_ChatAuthReqData(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.ChatAuthReqData);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_decodePbStr(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.decodePbStr);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_rspGroup(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.xlua_pushuint(L, gen_to_be_invoked.rspGroup);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_decodeFinish(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.decodeFinish);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_loginReqData(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.loginReqData = LuaAPI.lua_tobytes(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_authReqData(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.authReqData = LuaAPI.lua_tobytes(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_ChatAuthReqData(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.ChatAuthReqData = LuaAPI.lua_tobytes(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_decodePbStr(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.decodePbStr = LuaAPI.lua_tostring(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_rspGroup(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.rspGroup = LuaAPI.xlua_touint(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_decodeFinish(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.decodeFinish = LuaAPI.lua_toboolean(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_luaAuthCallback(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
BF.NetManager gen_to_be_invoked = (BF.NetManager)translator.FastGetCSObj(L, 1);
|
|
System.Action<bool> gen_delegate = translator.GetDelegate<System.Action<bool>>(L, 3);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#3 need System.Action<bool>!");
|
|
}
|
|
|
|
if (gen_param_count == 3)
|
|
{
|
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
|
|
gen_to_be_invoked.luaAuthCallback += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
|
|
gen_to_be_invoked.luaAuthCallback -= gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
}
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
LuaAPI.luaL_error(L, "invalid arguments to BF.NetManager.luaAuthCallback!");
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|