Пример #1
0
        public static DeclareSZZQScoreAward Create(string in_award, int in_score, int in_ues_exp_index)
        {
            DeclareSZZQScoreAward tmp = new DeclareSZZQScoreAward();

            tmp._award         = in_award;
            tmp._score         = in_score;
            tmp._ues_exp_index = in_ues_exp_index;

            return(tmp);
        }
Пример #2
0
 public static void Convert(Dictionary <int, DeclareSZZQScoreAward> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(500, DeclareSZZQScoreAward.Create(StringDefines.Key_42268, 500, 0));
     data.Add(1200, DeclareSZZQScoreAward.Create(StringDefines.Key_42269, 1200, 1));
     data.Add(1700, DeclareSZZQScoreAward.Create(StringDefines.Key_42270, 1700, 2));
     data.Add(2300, DeclareSZZQScoreAward.Create(StringDefines.Key_42271, 2300, 3));
     data.Add(3000, DeclareSZZQScoreAward.Create(StringDefines.Key_42272, 3000, 4));
 }
Пример #3
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[]> >("DataSZZQScoreAward");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataSZZQScoreAward = require 'Lua/Config/DataSZZQScoreAward'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataSZZQScoreAward");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareSZZQScoreAward>(5);
                    foreach (var item in dic)
                    {
                        DeclareSZZQScoreAward tmp = new DeclareSZZQScoreAward();
                        tmp.Award       = CfgStringLua.Get(item.Value[0]);
                        tmp.Score       = item.Value[1];
                        tmp.UesExpIndex = item.Value[2];

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