Beispiel #1
0
        public static DeclareTempleAward Create(string in_award, int in_id, int in_point, int in_process)
        {
            DeclareTempleAward tmp = new DeclareTempleAward();

            tmp._award   = in_award;
            tmp._id      = in_id;
            tmp._point   = in_point;
            tmp._process = in_process;

            return(tmp);
        }
Beispiel #2
0
 public static void Convert(Dictionary <int, DeclareTempleAward> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(101, DeclareTempleAward.Create(StringDefines.Key_18091, 101, 50, 1));
     data.Add(102, DeclareTempleAward.Create(StringDefines.Key_50141, 102, 100, 1));
     data.Add(103, DeclareTempleAward.Create(StringDefines.Key_50142, 103, 200, 1));
     data.Add(104, DeclareTempleAward.Create(StringDefines.Key_50143, 104, 500, 1));
     data.Add(105, DeclareTempleAward.Create(StringDefines.Key_50144, 105, 1000, 1));
     data.Add(106, DeclareTempleAward.Create(StringDefines.Key_50145, 106, 2000, 1));
     data.Add(107, DeclareTempleAward.Create(StringDefines.Key_50146, 107, 3000, 1));
     data.Add(108, DeclareTempleAward.Create(StringDefines.Key_50147, 108, 4000, 1));
     data.Add(109, DeclareTempleAward.Create(StringDefines.Key_50148, 109, 5000, 1));
     data.Add(201, DeclareTempleAward.Create(StringDefines.Key_18091, 201, 50, 2));
     data.Add(202, DeclareTempleAward.Create(StringDefines.Key_50149, 202, 100, 2));
     data.Add(203, DeclareTempleAward.Create(StringDefines.Key_50150, 203, 200, 2));
     data.Add(204, DeclareTempleAward.Create(StringDefines.Key_50151, 204, 500, 2));
     data.Add(205, DeclareTempleAward.Create(StringDefines.Key_50152, 205, 1000, 2));
     data.Add(206, DeclareTempleAward.Create(StringDefines.Key_50153, 206, 2000, 2));
     data.Add(207, DeclareTempleAward.Create(StringDefines.Key_50154, 207, 3000, 2));
     data.Add(208, DeclareTempleAward.Create(StringDefines.Key_50155, 208, 4000, 2));
     data.Add(209, DeclareTempleAward.Create(StringDefines.Key_50156, 209, 5000, 2));
     data.Add(301, DeclareTempleAward.Create(StringDefines.Key_18091, 301, 50, 3));
     data.Add(302, DeclareTempleAward.Create(StringDefines.Key_50157, 302, 100, 3));
     data.Add(303, DeclareTempleAward.Create(StringDefines.Key_50158, 303, 200, 3));
     data.Add(304, DeclareTempleAward.Create(StringDefines.Key_50159, 304, 500, 3));
     data.Add(305, DeclareTempleAward.Create(StringDefines.Key_50160, 305, 1000, 3));
     data.Add(306, DeclareTempleAward.Create(StringDefines.Key_50161, 306, 2000, 3));
     data.Add(307, DeclareTempleAward.Create(StringDefines.Key_50162, 307, 3000, 3));
     data.Add(308, DeclareTempleAward.Create(StringDefines.Key_50163, 308, 4000, 3));
     data.Add(309, DeclareTempleAward.Create(StringDefines.Key_50164, 309, 5000, 3));
     data.Add(401, DeclareTempleAward.Create(StringDefines.Key_18091, 401, 50, 4));
     data.Add(402, DeclareTempleAward.Create(StringDefines.Key_50165, 402, 100, 4));
     data.Add(403, DeclareTempleAward.Create(StringDefines.Key_50166, 403, 200, 4));
     data.Add(404, DeclareTempleAward.Create(StringDefines.Key_50167, 404, 500, 4));
     data.Add(405, DeclareTempleAward.Create(StringDefines.Key_50168, 405, 1000, 4));
     data.Add(406, DeclareTempleAward.Create(StringDefines.Key_50169, 406, 2000, 4));
     data.Add(407, DeclareTempleAward.Create(StringDefines.Key_50170, 407, 3000, 4));
     data.Add(408, DeclareTempleAward.Create(StringDefines.Key_50171, 408, 4000, 4));
     data.Add(409, DeclareTempleAward.Create(StringDefines.Key_50172, 409, 5000, 4));
     data.Add(501, DeclareTempleAward.Create(StringDefines.Key_18091, 501, 50, 5));
     data.Add(502, DeclareTempleAward.Create(StringDefines.Key_50173, 502, 100, 5));
     data.Add(503, DeclareTempleAward.Create(StringDefines.Key_50174, 503, 200, 5));
     data.Add(504, DeclareTempleAward.Create(StringDefines.Key_50175, 504, 500, 5));
     data.Add(505, DeclareTempleAward.Create(StringDefines.Key_50176, 505, 1000, 5));
     data.Add(506, DeclareTempleAward.Create(StringDefines.Key_50177, 506, 2000, 5));
     data.Add(507, DeclareTempleAward.Create(StringDefines.Key_50178, 507, 3000, 5));
     data.Add(508, DeclareTempleAward.Create(StringDefines.Key_50179, 508, 4000, 5));
     data.Add(509, DeclareTempleAward.Create(StringDefines.Key_50180, 509, 5000, 5));
 }
Beispiel #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[]> >("DataTempleAward");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataTempleAward = require 'Lua/Config/DataTempleAward'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataTempleAward");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareTempleAward>(45);
                    foreach (var item in dic)
                    {
                        DeclareTempleAward tmp = new DeclareTempleAward();
                        tmp.Award   = CfgStringLua.Get(item.Value[0]);
                        tmp.Id      = item.Value[1];
                        tmp.Point   = item.Value[2];
                        tmp.Process = item.Value[3];

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