コード例 #1
0
        public static DeclareKingFightFeatsAward Create(string in_award, int in_feats)
        {
            DeclareKingFightFeatsAward tmp = new DeclareKingFightFeatsAward();

            tmp._award = in_award;
            tmp._feats = in_feats;

            return(tmp);
        }
コード例 #2
0
 public static void Convert(Dictionary <int, DeclareKingFightFeatsAward> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(500, DeclareKingFightFeatsAward.Create(StringDefines.Key_42255, 500));
     data.Add(1000, DeclareKingFightFeatsAward.Create(StringDefines.Key_42256, 1000));
     data.Add(1500, DeclareKingFightFeatsAward.Create(StringDefines.Key_42257, 1500));
     data.Add(2000, DeclareKingFightFeatsAward.Create(StringDefines.Key_42258, 2000));
     data.Add(2500, DeclareKingFightFeatsAward.Create(StringDefines.Key_42259, 2500));
     data.Add(3000, DeclareKingFightFeatsAward.Create(StringDefines.Key_42260, 3000));
     data.Add(4000, DeclareKingFightFeatsAward.Create(StringDefines.Key_42261, 4000));
     data.Add(5000, DeclareKingFightFeatsAward.Create(StringDefines.Key_42262, 5000));
     data.Add(6000, DeclareKingFightFeatsAward.Create(StringDefines.Key_42263, 6000));
     data.Add(7000, DeclareKingFightFeatsAward.Create(StringDefines.Key_42264, 7000));
     data.Add(8000, DeclareKingFightFeatsAward.Create(StringDefines.Key_42265, 8000));
     data.Add(9000, DeclareKingFightFeatsAward.Create(StringDefines.Key_42266, 9000));
     data.Add(10000, DeclareKingFightFeatsAward.Create(StringDefines.Key_42267, 10000));
 }
コード例 #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[]> >("DataKingFightFeatsAward");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataKingFightFeatsAward = require 'Lua/Config/DataKingFightFeatsAward'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataKingFightFeatsAward");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareKingFightFeatsAward>(13);
                    foreach (var item in dic)
                    {
                        DeclareKingFightFeatsAward tmp = new DeclareKingFightFeatsAward();
                        tmp.Award = CfgStringLua.Get(item.Value[0]);
                        tmp.Feats = item.Value[1];

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