Example #1
0
        public static DeclareKingAllianceFeatsAward Create(string in_award, int in_feats)
        {
            DeclareKingAllianceFeatsAward tmp = new DeclareKingAllianceFeatsAward();

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

            return(tmp);
        }
 public static void Convert(Dictionary <int, DeclareKingAllianceFeatsAward> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1000, DeclareKingAllianceFeatsAward.Create(StringDefines.Key_18664, 1000));
     data.Add(2000, DeclareKingAllianceFeatsAward.Create(StringDefines.Key_18665, 2000));
     data.Add(3000, DeclareKingAllianceFeatsAward.Create(StringDefines.Key_18666, 3000));
     data.Add(4000, DeclareKingAllianceFeatsAward.Create(StringDefines.Key_18667, 4000));
     data.Add(5000, DeclareKingAllianceFeatsAward.Create(StringDefines.Key_18668, 5000));
     data.Add(6000, DeclareKingAllianceFeatsAward.Create(StringDefines.Key_18669, 6000));
     data.Add(8000, DeclareKingAllianceFeatsAward.Create(StringDefines.Key_18670, 8000));
     data.Add(10000, DeclareKingAllianceFeatsAward.Create(StringDefines.Key_18671, 10000));
     data.Add(12000, DeclareKingAllianceFeatsAward.Create(StringDefines.Key_18672, 12000));
     data.Add(14000, DeclareKingAllianceFeatsAward.Create(StringDefines.Key_18673, 14000));
     data.Add(16000, DeclareKingAllianceFeatsAward.Create(StringDefines.Key_18674, 16000));
     data.Add(18000, DeclareKingAllianceFeatsAward.Create(StringDefines.Key_18675, 18000));
     data.Add(20000, DeclareKingAllianceFeatsAward.Create(StringDefines.Key_18676, 20000));
 }
Example #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[]> >("DataKingAllianceFeatsAward");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataKingAllianceFeatsAward = require 'Lua/Config/DataKingAllianceFeatsAward'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataKingAllianceFeatsAward");
                }

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

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