Esempio n. 1
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));
            }
        }
Esempio n. 2
0
        static int _m_HandleBattleEnd(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                BattleServer.Battle.BattleManager __cl_gen_to_be_invoked = (BattleServer.Battle.BattleManager)translator.FastGetCSObj(L, 1);



                {
                    BattleServer.Battle.Battle battle = (BattleServer.Battle.Battle)translator.GetObject(L, 2, typeof(BattleServer.Battle.Battle));
                    ulong gcNID = LuaAPI.lua_touint64(L, 3);
                    Protos.GC2BS_EndBattle endBattle = (Protos.GC2BS_EndBattle)translator.GetObject(L, 4, typeof(Protos.GC2BS_EndBattle));

                    __cl_gen_to_be_invoked.HandleBattleEnd(battle, gcNID, endBattle);



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

                BattleServer.Battle.Battle __cl_gen_to_be_invoked = (BattleServer.Battle.Battle)translator.FastGetCSObj(L, 1);
                translator.Push(L, __cl_gen_to_be_invoked.battleEntry);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(1);
        }
        static int _g_get_gladiatorTimeout(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                BattleServer.Battle.Battle __cl_gen_to_be_invoked = (BattleServer.Battle.Battle)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, __cl_gen_to_be_invoked.gladiatorTimeout);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(1);
        }
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    BattleServer.Battle.Battle __cl_gen_ret = new BattleServer.Battle.Battle();
                    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.Battle.Battle constructor!"));
        }
Esempio n. 6
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 3 && translator.Assignable <Protos.CS2BS_PlayerInfo>(L, 2) && translator.Assignable <BattleServer.Battle.Battle>(L, 3))
                {
                    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 = new BattleServer.User.BSUser(playerInfo, battle);
                    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.BSUser constructor!"));
        }
        static int _m_Clear(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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



                {
                    __cl_gen_to_be_invoked.Clear(  );



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


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



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



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


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



                {
                    int index = LuaAPI.xlua_tointeger(L, 2);

                    BattleServer.Battle.Model.Team __cl_gen_ret = __cl_gen_to_be_invoked.GetTeam(index);
                    translator.Push(L, __cl_gen_ret);



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


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



                {
                    ulong id = LuaAPI.lua_touint64(L, 2);

                    BattleServer.Battle.Model.Champion __cl_gen_ret = __cl_gen_to_be_invoked.GetChampion(id);
                    translator.Push(L, __cl_gen_ret);



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