Exemplo n.º 1
0
        public static DeclareGuildFightPersonal Create(int in_area, int in_num, int in_ranking_interval_max, int in_ranking_interval_mini, string in_reward_item)
        {
            DeclareGuildFightPersonal tmp = new DeclareGuildFightPersonal();

            tmp._area = in_area;
            tmp._num  = in_num;
            tmp._ranking_interval_max  = in_ranking_interval_max;
            tmp._ranking_interval_mini = in_ranking_interval_mini;
            tmp._reward_item           = in_reward_item;

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

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareGuildFightPersonal>(16);
                    foreach (var item in dic)
                    {
                        DeclareGuildFightPersonal tmp = new DeclareGuildFightPersonal();
                        tmp.Area = item.Value[0];
                        tmp.Num  = item.Value[1];
                        tmp.RankingIntervalMax  = item.Value[2];
                        tmp.RankingIntervalMini = item.Value[3];
                        tmp.RewardItem          = CfgStringLua.Get(item.Value[4]);

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "GuildFightPersonal");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclareGuildFightPersonal>(16);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "GuildFightPersonal");
                }
            }
        }
Exemplo n.º 3
0
 public static void Convert(Dictionary <int, DeclareGuildFightPersonal> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareGuildFightPersonal.Create(10, 1, 1, 1, StringDefines.Key_12701));
     data.Add(2, DeclareGuildFightPersonal.Create(10, 2, 5, 2, StringDefines.Key_12702));
     data.Add(3, DeclareGuildFightPersonal.Create(10, 3, 20, 6, StringDefines.Key_12703));
     data.Add(4, DeclareGuildFightPersonal.Create(10, 4, 1000, 21, StringDefines.Key_12704));
     data.Add(5, DeclareGuildFightPersonal.Create(1, 5, 1, 1, StringDefines.Key_12701));
     data.Add(6, DeclareGuildFightPersonal.Create(1, 6, 5, 2, StringDefines.Key_12702));
     data.Add(7, DeclareGuildFightPersonal.Create(1, 7, 20, 6, StringDefines.Key_12703));
     data.Add(8, DeclareGuildFightPersonal.Create(1, 8, 1000, 21, StringDefines.Key_12704));
     data.Add(9, DeclareGuildFightPersonal.Create(2, 9, 1, 1, StringDefines.Key_12705));
     data.Add(10, DeclareGuildFightPersonal.Create(2, 10, 5, 2, StringDefines.Key_12706));
     data.Add(11, DeclareGuildFightPersonal.Create(2, 11, 20, 6, StringDefines.Key_12707));
     data.Add(12, DeclareGuildFightPersonal.Create(2, 12, 1000, 21, StringDefines.Key_12708));
     data.Add(13, DeclareGuildFightPersonal.Create(3, 13, 1, 1, StringDefines.Key_12709));
     data.Add(14, DeclareGuildFightPersonal.Create(3, 14, 5, 2, StringDefines.Key_12710));
     data.Add(15, DeclareGuildFightPersonal.Create(3, 15, 20, 6, StringDefines.Key_12711));
     data.Add(16, DeclareGuildFightPersonal.Create(3, 16, 1000, 21, StringDefines.Key_12712));
 }