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


            System.Collections.Generic.Dictionary <ulong, xc.GoodsEquip> __cl_gen_to_be_invoked = (System.Collections.Generic.Dictionary <ulong, xc.GoodsEquip>)translator.FastGetCSObj(L, 1);


            try {
                {
                    ulong         key = LuaAPI.lua_touint64(L, 2);
                    xc.GoodsEquip value;

                    bool __cl_gen_ret = __cl_gen_to_be_invoked.TryGetValue(key, out value);
                    LuaAPI.lua_pushboolean(L, __cl_gen_ret);
                    translator.Push(L, value);



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


                GateServer.GSUserMgr __cl_gen_to_be_invoked = (GateServer.GSUserMgr)translator.FastGetCSObj(L, 1);



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

                    bool __cl_gen_ret = __cl_gen_to_be_invoked.GetSID(gcNID, out sid);
                    LuaAPI.lua_pushboolean(L, __cl_gen_ret);
                    LuaAPI.xlua_pushuint(L, sid);



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


                MongoDB.Bson.Serialization.Serializers.UInt64Serializer gen_to_be_invoked = (MongoDB.Bson.Serialization.Serializers.UInt64Serializer)translator.FastGetCSObj(L, 1);



                {
                    MongoDB.Bson.Serialization.BsonSerializationContext _context = (MongoDB.Bson.Serialization.BsonSerializationContext)translator.GetObject(L, 2, typeof(MongoDB.Bson.Serialization.BsonSerializationContext));
                    MongoDB.Bson.Serialization.BsonSerializationArgs    _args; translator.Get(L, 3, out _args);
                    ulong _value = LuaAPI.lua_touint64(L, 4);

                    gen_to_be_invoked.Serialize(_context, _args, _value);



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


                GameCloud.Unity.Common.TimerShaft gen_to_be_invoked = (GameCloud.Unity.Common.TimerShaft)translator.FastGetCSObj(L, 1);



                {
                    ulong         _tm = LuaAPI.lua_touint64(L, 2);
                    System.Action _cb = translator.GetDelegate <System.Action>(L, 3);

                    GameCloud.Unity.Common.EbTimer gen_ret = gen_to_be_invoked.RegisterTimer(_tm, _cb);
                    translator.Push(L, gen_ret);



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


                System.Collections.Concurrent.ConcurrentDictionary <long, ulong> gen_to_be_invoked = (System.Collections.Concurrent.ConcurrentDictionary <long, ulong>)translator.FastGetCSObj(L, 1);



                {
                    long  _key             = LuaAPI.lua_toint64(L, 2);
                    ulong _newValue        = LuaAPI.lua_touint64(L, 3);
                    ulong _comparisonValue = LuaAPI.lua_touint64(L, 4);

                    bool gen_ret = gen_to_be_invoked.TryUpdate(
                        _key,
                        _newValue,
                        _comparisonValue);
                    LuaAPI.lua_pushboolean(L, gen_ret);



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


                GameCloud.Unity.Common.TimerShaft gen_to_be_invoked = (GameCloud.Unity.Common.TimerShaft)translator.FastGetCSObj(L, 1);



                {
                    GameCloud.Unity.Common.EbTimeEvent _time_event = (GameCloud.Unity.Common.EbTimeEvent)translator.GetObject(L, 2, typeof(GameCloud.Unity.Common.EbTimeEvent));
                    ulong _expires = LuaAPI.lua_touint64(L, 3);

                    int gen_ret = gen_to_be_invoked.ModTimer(_time_event, _expires);
                    LuaAPI.xlua_pushinteger(L, gen_ret);



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


                Casinos.TimerShaft gen_to_be_invoked = (Casinos.TimerShaft)translator.FastGetCSObj(L, 1);



                {
                    ulong                _tm        = LuaAPI.lua_touint64(L, 2);
                    XLua.LuaTable        _lua_table = (XLua.LuaTable)translator.GetObject(L, 3, typeof(XLua.LuaTable));
                    Casinos.DelegateLua2 _cb        = translator.GetDelegate <Casinos.DelegateLua2>(L, 4);

                    Casinos.EbTimer gen_ret = gen_to_be_invoked.RegisterTimer(_tm, _lua_table, _cb);
                    translator.Push(L, gen_ret);



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


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



                {
                    ulong rid   = LuaAPI.lua_touint64(L, 2);
                    bool  isNew = LuaAPI.lua_toboolean(L, 3);
                    Google.Protobuf.CodedInputStream reader = (Google.Protobuf.CodedInputStream)translator.GetObject(L, 4, typeof(Google.Protobuf.CodedInputStream));

                    __cl_gen_to_be_invoked.DecodeSnapshot(rid, isNew, reader);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Esempio n. 11
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));
            }
        }
Esempio n. 12
0
        static int _m_LoadFromFile_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 1 && (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING))
                {
                    string _path = LuaAPI.lua_tostring(L, 1);

                    UnityEngine.AssetBundle gen_ret = UnityEngine.AssetBundle.LoadFromFile(
                        _path);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
                {
                    string _path = LuaAPI.lua_tostring(L, 1);
                    uint   _crc  = LuaAPI.xlua_touint(L, 2);

                    UnityEngine.AssetBundle gen_ret = UnityEngine.AssetBundle.LoadFromFile(
                        _path,
                        _crc);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) || LuaAPI.lua_isuint64(L, 3)))
                {
                    string _path   = LuaAPI.lua_tostring(L, 1);
                    uint   _crc    = LuaAPI.xlua_touint(L, 2);
                    ulong  _offset = LuaAPI.lua_touint64(L, 3);

                    UnityEngine.AssetBundle gen_ret = UnityEngine.AssetBundle.LoadFromFile(
                        _path,
                        _crc,
                        _offset);
                    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 UnityEngine.AssetBundle.LoadFromFile!"));
        }
        static int _s_set_mExpires(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                Casinos.EbTimeEvent gen_to_be_invoked = (Casinos.EbTimeEvent)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.mExpires = LuaAPI.lua_touint64(L, 2);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
Esempio n. 14
0
        static int _s_set_exp(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                xc.DungeonDeadSpaceScore __cl_gen_to_be_invoked = (xc.DungeonDeadSpaceScore)translator.FastGetCSObj(L, 1);
                __cl_gen_to_be_invoked.exp = LuaAPI.lua_touint64(L, 2);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(0);
        }
        static int _s_set_mLastJeffies(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                GameCloud.Unity.Common.TimerShaft gen_to_be_invoked = (GameCloud.Unity.Common.TimerShaft)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.mLastJeffies = LuaAPI.lua_touint64(L, 2);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
        static int _s_set_rid(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                BattleServer.Battle.Model.Entity __cl_gen_to_be_invoked = (BattleServer.Battle.Model.Entity)translator.FastGetCSObj(L, 1);
                __cl_gen_to_be_invoked.rid = LuaAPI.lua_touint64(L, 2);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(0);
        }
Esempio n. 17
0
        static int _s_set_FairyValleyExpRecord(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                xc.InstanceManager __cl_gen_to_be_invoked = (xc.InstanceManager)translator.FastGetCSObj(L, 1);
                __cl_gen_to_be_invoked.FairyValleyExpRecord = LuaAPI.lua_touint64(L, 2);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(0);
        }
        static int _s_set_num(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                xc.ItemManager.TmpGetGoods __cl_gen_to_be_invoked = (xc.ItemManager.TmpGetGoods)translator.FastGetCSObj(L, 1);
                __cl_gen_to_be_invoked.num = LuaAPI.lua_touint64(L, 2);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(0);
        }
        static int _s_set_cpuTimeFrameComplete(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                UnityEngine.FrameTiming gen_to_be_invoked; translator.Get(L, 1, out gen_to_be_invoked);
                gen_to_be_invoked.cpuTimeFrameComplete = LuaAPI.lua_touint64(L, 2);

                translator.Update(L, 1, gen_to_be_invoked);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
Esempio n. 20
0
        static int _m_AddOrUpdate(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                System.Collections.Concurrent.ConcurrentDictionary <long, ulong> gen_to_be_invoked = (System.Collections.Concurrent.ConcurrentDictionary <long, ulong>)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 4 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isint64(L, 2)) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) || LuaAPI.lua_isuint64(L, 3)) && translator.Assignable <System.Func <long, ulong, ulong> >(L, 4))
                {
                    long  _key      = LuaAPI.lua_toint64(L, 2);
                    ulong _addValue = LuaAPI.lua_touint64(L, 3);
                    System.Func <long, ulong, ulong> _updateValueFactory = translator.GetDelegate <System.Func <long, ulong, ulong> >(L, 4);

                    ulong gen_ret = gen_to_be_invoked.AddOrUpdate(
                        _key,
                        _addValue,
                        _updateValueFactory);
                    LuaAPI.lua_pushuint64(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 4 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isint64(L, 2)) && translator.Assignable <System.Func <long, ulong> >(L, 3) && translator.Assignable <System.Func <long, ulong, ulong> >(L, 4))
                {
                    long _key = LuaAPI.lua_toint64(L, 2);
                    System.Func <long, ulong>        _addValueFactory    = translator.GetDelegate <System.Func <long, ulong> >(L, 3);
                    System.Func <long, ulong, ulong> _updateValueFactory = translator.GetDelegate <System.Func <long, ulong, ulong> >(L, 4);

                    ulong gen_ret = gen_to_be_invoked.AddOrUpdate(
                        _key,
                        _addValueFactory,
                        _updateValueFactory);
                    LuaAPI.lua_pushuint64(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 System.Collections.Concurrent.ConcurrentDictionary<long, ulong>.AddOrUpdate!"));
        }
Esempio n. 21
0
        static int _m_TimerRemove_xlua_st_(RealStatePtr L)
        {
            try {
                {
                    ulong _id = LuaAPI.lua_touint64(L, 1);

                    Lua.LuaHelp.TimerRemove(_id);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Esempio n. 22
0
        static int _m_SwapUInt64_xlua_st_(RealStatePtr L)
        {
            try {
                {
                    ulong _n = LuaAPI.lua_touint64(L, 1);

                    ulong gen_ret = XLuaFramework.Util.SwapUInt64(_n);
                    LuaAPI.lua_pushuint64(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Esempio n. 23
0
        int SystemIOBinaryWriter_m_WriteULong(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;


            System.IO.BinaryWriter gen_to_be_invoked = (System.IO.BinaryWriter)translator.FastGetCSObj(L, 1);


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

                gen_to_be_invoked.WriteULong(_value);



                return(0);
            }
        }
Esempio n. 24
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 2 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isuint64(L, 2)))
                {
                    ulong _i = LuaAPI.lua_touint64(L, 2);

                    XLua.Cast.UInt64 gen_ret = new XLua.Cast.UInt64(_i);
                    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 XLua.Cast.UInt64 constructor!"));
        }
        static int __CreateInstance(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                if (LuaAPI.lua_gettop(L) == 3 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isuint64(L, 2)) && translator.Assignable <xc.GoodsEquip>(L, 3))
                {
                    ulong         key   = LuaAPI.lua_touint64(L, 2);
                    xc.GoodsEquip value = (xc.GoodsEquip)translator.GetObject(L, 3, typeof(xc.GoodsEquip));

                    System.Collections.Generic.KeyValuePair <ulong, xc.GoodsEquip> __cl_gen_ret = new System.Collections.Generic.KeyValuePair <ulong, xc.GoodsEquip>(key, value);
                    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 System.Collections.Generic.KeyValuePair<ulong, xc.GoodsEquip> constructor!"));
        }
Esempio n. 26
0
        static int __CreateInstance(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                if (LuaAPI.lua_gettop(L) == 4 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) || LuaAPI.lua_isuint64(L, 4)))
                {
                    uint  lv    = LuaAPI.xlua_touint(L, 2);
                    uint  score = LuaAPI.xlua_touint(L, 3);
                    ulong exp   = LuaAPI.lua_touint64(L, 4);

                    xc.DungeonDeadSpaceScore __cl_gen_ret = new xc.DungeonDeadSpaceScore(lv, score, exp);
                    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 xc.DungeonDeadSpaceScore constructor!"));
        }
Esempio n. 27
0
        public static int __NewIndexer(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                if (translator.Assignable <System.Collections.Concurrent.ConcurrentDictionary <long, ulong> >(L, 1) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isint64(L, 2)) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) || LuaAPI.lua_isuint64(L, 3)))
                {
                    System.Collections.Concurrent.ConcurrentDictionary <long, ulong> gen_to_be_invoked = (System.Collections.Concurrent.ConcurrentDictionary <long, ulong>)translator.FastGetCSObj(L, 1);
                    long key = LuaAPI.lua_toint64(L, 2);
                    gen_to_be_invoked[key] = LuaAPI.lua_touint64(L, 3);
                    LuaAPI.lua_pushboolean(L, true);
                    return(1);
                }
            }
            catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            LuaAPI.lua_pushboolean(L, false);
            return(1);
        }
Esempio n. 28
0
        public static int __NewIndexer(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                if (translator.Assignable <System.Collections.Generic.Dictionary <ulong, xc.GoodsEquip> >(L, 1) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isuint64(L, 2)) && translator.Assignable <xc.GoodsEquip>(L, 3))
                {
                    System.Collections.Generic.Dictionary <ulong, xc.GoodsEquip> __cl_gen_to_be_invoked = (System.Collections.Generic.Dictionary <ulong, xc.GoodsEquip>)translator.FastGetCSObj(L, 1);
                    ulong key = LuaAPI.lua_touint64(L, 2);
                    __cl_gen_to_be_invoked[key] = (xc.GoodsEquip)translator.GetObject(L, 3, typeof(xc.GoodsEquip));
                    LuaAPI.lua_pushboolean(L, true);
                    return(1);
                }
            }
            catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }

            LuaAPI.lua_pushboolean(L, false);
            return(1);
        }
Esempio n. 29
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 4 && translator.Assignable <GameCloud.Unity.Common.TimerShaft>(L, 2) && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) || LuaAPI.lua_isuint64(L, 3)) && translator.Assignable <System.Action>(L, 4))
                {
                    GameCloud.Unity.Common.TimerShaft _timer_shaft = (GameCloud.Unity.Common.TimerShaft)translator.GetObject(L, 2, typeof(GameCloud.Unity.Common.TimerShaft));
                    ulong         _tm = LuaAPI.lua_touint64(L, 3);
                    System.Action _cb = translator.GetDelegate <System.Action>(L, 4);

                    GameCloud.Unity.Common.EbTimer gen_ret = new GameCloud.Unity.Common.EbTimer(_timer_shaft, _tm, _cb);
                    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 GameCloud.Unity.Common.EbTimer constructor!"));
        }
        static int _m_HasUser(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                CentralServer.User.CSUserMgr __cl_gen_to_be_invoked = (CentralServer.User.CSUserMgr)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 ukey = LuaAPI.xlua_touint(L, 2);

                    bool __cl_gen_ret = __cl_gen_to_be_invoked.HasUser(ukey);
                    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 CentralServer.User.CSUserMgr.HasUser!"));
        }