Beispiel #1
0
        static int _m_Online(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                BattleServer.User.BSUserMgr __cl_gen_to_be_invoked = (BattleServer.User.BSUserMgr)translator.FastGetCSObj(L, 1);



                {
                    ulong gcNID = LuaAPI.lua_touint64(L, 2);
                    uint  sid   = LuaAPI.xlua_touint(L, 3);

                    BattleServer.User.BSUser __cl_gen_ret = __cl_gen_to_be_invoked.Online(gcNID, sid);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Beispiel #2
0
        static int _m_CreateUser(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                BattleServer.User.BSUserMgr __cl_gen_to_be_invoked = (BattleServer.User.BSUserMgr)translator.FastGetCSObj(L, 1);



                {
                    Protos.CS2BS_PlayerInfo    playerInfo = (Protos.CS2BS_PlayerInfo)translator.GetObject(L, 2, typeof(Protos.CS2BS_PlayerInfo));
                    BattleServer.Battle.Battle battle     = (BattleServer.Battle.Battle)translator.GetObject(L, 3, typeof(BattleServer.Battle.Battle));

                    BattleServer.User.BSUser __cl_gen_ret = __cl_gen_to_be_invoked.CreateUser(playerInfo, battle);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Beispiel #3
0
        static int _m_SendToUser(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                BattleServer.User.BSUserMgr __cl_gen_to_be_invoked = (BattleServer.User.BSUserMgr)translator.FastGetCSObj(L, 1);



                {
                    ulong gcNID = LuaAPI.lua_touint64(L, 2);
                    Google.Protobuf.IMessage message = (Google.Protobuf.IMessage)translator.GetObject(L, 3, typeof(Google.Protobuf.IMessage));

                    bool __cl_gen_ret = __cl_gen_to_be_invoked.SendToUser(gcNID, message);
                    LuaAPI.lua_pushboolean(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Beispiel #4
0
        static int _g_get_count(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                BattleServer.User.BSUserMgr __cl_gen_to_be_invoked = (BattleServer.User.BSUserMgr)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, __cl_gen_to_be_invoked.count);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(1);
        }
Beispiel #5
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    BattleServer.User.BSUserMgr __cl_gen_ret = new BattleServer.User.BSUserMgr();
                    translator.Push(L, __cl_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 BattleServer.User.BSUserMgr constructor!"));
        }
Beispiel #6
0
        static int _m_OfflineAndDestroyAllUsers(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                BattleServer.User.BSUserMgr __cl_gen_to_be_invoked = (BattleServer.User.BSUserMgr)translator.FastGetCSObj(L, 1);



                {
                    __cl_gen_to_be_invoked.OfflineAndDestroyAllUsers(  );



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Beispiel #7
0
        static int _m_HasUser(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                BattleServer.User.BSUserMgr __cl_gen_to_be_invoked = (BattleServer.User.BSUserMgr)translator.FastGetCSObj(L, 1);


                int __gen_param_count = LuaAPI.lua_gettop(L);

                if (__gen_param_count == 2 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isuint64(L, 2)))
                {
                    ulong gcNID = LuaAPI.lua_touint64(L, 2);

                    bool __cl_gen_ret = __cl_gen_to_be_invoked.HasUser(gcNID);
                    LuaAPI.lua_pushboolean(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
                {
                    uint sid = LuaAPI.xlua_touint(L, 2);

                    bool __cl_gen_ret = __cl_gen_to_be_invoked.HasUser(sid);
                    LuaAPI.lua_pushboolean(L, __cl_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 BattleServer.User.BSUserMgr.HasUser!"));
        }
Beispiel #8
0
        static int _m_LS(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                BattleServer.User.BSUserMgr __cl_gen_to_be_invoked = (BattleServer.User.BSUserMgr)translator.FastGetCSObj(L, 1);



                {
                    string __cl_gen_ret = __cl_gen_to_be_invoked.LS(  );
                    LuaAPI.lua_pushstring(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Beispiel #9
0
        static int _m_DestroyUser(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                BattleServer.User.BSUserMgr __cl_gen_to_be_invoked = (BattleServer.User.BSUserMgr)translator.FastGetCSObj(L, 1);



                {
                    BattleServer.User.BSUser user = (BattleServer.User.BSUser)translator.GetObject(L, 2, typeof(BattleServer.User.BSUser));

                    __cl_gen_to_be_invoked.DestroyUser(user);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }