Example #1
0
        public static DeclareCiyuanSeal Create(string in_sea_attribute, int in_sea_level, int in_sea_material)
        {
            DeclareCiyuanSeal tmp = new DeclareCiyuanSeal();

            tmp._sea_attribute = in_sea_attribute;
            tmp._sea_level     = in_sea_level;
            tmp._sea_material  = in_sea_material;

            return(tmp);
        }
Example #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[]> >("DataCiyuanSeal");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataCiyuanSeal = require 'Lua/Config/DataCiyuanSeal'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataCiyuanSeal");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareCiyuanSeal>(1000);
                    foreach (var item in dic)
                    {
                        DeclareCiyuanSeal tmp = new DeclareCiyuanSeal();
                        tmp.SeaAttribute = CfgStringLua.Get(item.Value[0]);
                        tmp.SeaLevel     = item.Value[1];
                        tmp.SeaMaterial  = item.Value[2];

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