public static DeclareKingAllianceSeasonAward Create(string in_award, int in_feats, int in_king_level, int in_rank_max, int in_rank_min)
        {
            DeclareKingAllianceSeasonAward tmp = new DeclareKingAllianceSeasonAward();

            tmp._award      = in_award;
            tmp._feats      = in_feats;
            tmp._king_level = in_king_level;
            tmp._rank_max   = in_rank_max;
            tmp._rank_min   = in_rank_min;

            return(tmp);
        }
Esempio n. 2
0
 public static void Convert(Dictionary <int, DeclareKingAllianceSeasonAward> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58091, 1, 0, 1, 1));
     data.Add(2, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58092, 2, 0, 3, 2));
     data.Add(3, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58093, 3, 0, 10, 4));
     data.Add(101, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58094, 101, 30, 0, 0));
     data.Add(102, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58095, 102, 29, 0, 0));
     data.Add(103, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58096, 103, 28, 0, 0));
     data.Add(104, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58097, 104, 27, 0, 0));
     data.Add(105, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58098, 105, 26, 0, 0));
     data.Add(106, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58099, 106, 25, 0, 0));
     data.Add(107, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58100, 107, 24, 0, 0));
     data.Add(108, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58101, 108, 23, 0, 0));
     data.Add(109, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58102, 109, 22, 0, 0));
     data.Add(110, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58103, 110, 21, 0, 0));
     data.Add(111, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58104, 111, 20, 0, 0));
     data.Add(112, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58105, 112, 19, 0, 0));
     data.Add(113, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58106, 113, 18, 0, 0));
     data.Add(114, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58107, 114, 17, 0, 0));
     data.Add(115, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58108, 115, 16, 0, 0));
     data.Add(116, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58109, 116, 15, 0, 0));
     data.Add(117, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58110, 117, 14, 0, 0));
     data.Add(118, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58111, 118, 13, 0, 0));
     data.Add(119, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58112, 119, 12, 0, 0));
     data.Add(120, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58113, 120, 11, 0, 0));
     data.Add(121, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58114, 121, 10, 0, 0));
     data.Add(122, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58115, 122, 9, 0, 0));
     data.Add(123, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58116, 123, 8, 0, 0));
     data.Add(124, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58117, 124, 7, 0, 0));
     data.Add(125, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58118, 125, 6, 0, 0));
     data.Add(126, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58119, 126, 5, 0, 0));
     data.Add(127, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58120, 127, 4, 0, 0));
     data.Add(128, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58121, 128, 3, 0, 0));
     data.Add(129, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58122, 129, 2, 0, 0));
     data.Add(130, DeclareKingAllianceSeasonAward.Create(StringDefines.Key_58123, 130, 1, 0, 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[]> >("DataKingAllianceSeasonAward");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataKingAllianceSeasonAward = require 'Lua/Config/DataKingAllianceSeasonAward'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataKingAllianceSeasonAward");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareKingAllianceSeasonAward>(33);
                    foreach (var item in dic)
                    {
                        DeclareKingAllianceSeasonAward tmp = new DeclareKingAllianceSeasonAward();
                        tmp.Award     = CfgStringLua.Get(item.Value[0]);
                        tmp.Feats     = item.Value[1];
                        tmp.KingLevel = item.Value[2];
                        tmp.RankMax   = item.Value[3];
                        tmp.RankMin   = item.Value[4];

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