예제 #1
0
        public static DeclareJJCAeward Create(int in_id, string in_rank, string in_reward)
        {
            DeclareJJCAeward tmp = new DeclareJJCAeward();

            tmp._id     = in_id;
            tmp._rank   = in_rank;
            tmp._reward = in_reward;

            return(tmp);
        }
예제 #2
0
 public static void Convert(Dictionary <int, DeclareJJCAeward> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareJJCAeward.Create(1, StringDefines.Key_2217, StringDefines.Key_56256));
     data.Add(2, DeclareJJCAeward.Create(2, StringDefines.Key_5122, StringDefines.Key_58268));
     data.Add(3, DeclareJJCAeward.Create(3, StringDefines.Key_49733, StringDefines.Key_56243));
     data.Add(4, DeclareJJCAeward.Create(4, StringDefines.Key_58269, StringDefines.Key_58270));
     data.Add(5, DeclareJJCAeward.Create(5, StringDefines.Key_58271, StringDefines.Key_50006));
     data.Add(6, DeclareJJCAeward.Create(6, StringDefines.Key_58272, StringDefines.Key_58273));
     data.Add(7, DeclareJJCAeward.Create(7, StringDefines.Key_58274, StringDefines.Key_56217));
     data.Add(8, DeclareJJCAeward.Create(8, StringDefines.Key_58275, StringDefines.Key_58276));
     data.Add(9, DeclareJJCAeward.Create(9, StringDefines.Key_58277, StringDefines.Key_56204));
     data.Add(10, DeclareJJCAeward.Create(10, StringDefines.Key_58278, StringDefines.Key_58279));
 }
예제 #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[]> >("DataJJCAeward");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataJJCAeward = require 'Lua/Config/DataJJCAeward'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataJJCAeward");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareJJCAeward>(10);
                    foreach (var item in dic)
                    {
                        DeclareJJCAeward tmp = new DeclareJJCAeward();
                        tmp.Id     = item.Value[0];
                        tmp.Rank   = CfgStringLua.Get(item.Value[1]);
                        tmp.Reward = CfgStringLua.Get(item.Value[2]);

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