示例#1
0
        public static DeclareEquipSeal Create(int in_effect_id, int in_effect_uiid, int in_nocite, string in_sea_attribute, int in_sea_level, int in_sea_material, int in_skill, string in_up_item)
        {
            DeclareEquipSeal tmp = new DeclareEquipSeal();

            tmp._effect_id     = in_effect_id;
            tmp._effect_uiid   = in_effect_uiid;
            tmp._nocite        = in_nocite;
            tmp._sea_attribute = in_sea_attribute;
            tmp._sea_level     = in_sea_level;
            tmp._sea_material  = in_sea_material;
            tmp._skill         = in_skill;
            tmp._up_item       = in_up_item;

            return(tmp);
        }
示例#2
0
        public static void SetData()
        {
            if (_dataCaches == null && LuaEnv.isLoadLuaCfg)
            {
                long startTime = DateTime.Now.Ticks;
                Dictionary <int, int[]> dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataEquipSeal");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataEquipSeal = require 'Lua/Config/DataEquipSeal'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataEquipSeal");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareEquipSeal>(2000);
                    foreach (var item in dic)
                    {
                        DeclareEquipSeal tmp = new DeclareEquipSeal();
                        tmp.EffectId     = item.Value[0];
                        tmp.EffectUiid   = item.Value[1];
                        tmp.Nocite       = item.Value[2];
                        tmp.SeaAttribute = CfgStringLua.Get(item.Value[3]);
                        tmp.SeaLevel     = item.Value[4];
                        tmp.SeaMaterial  = item.Value[5];
                        tmp.Skill        = item.Value[6];
                        tmp.UpItem       = CfgStringLua.Get(item.Value[7]);

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "EquipSeal");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclareEquipSeal>(2000);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "EquipSeal");
                }
            }
        }