예제 #1
0
 public static void Convert(Dictionary <int, DeclareRandTips> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareRandTips.Create(1, StringDefines.Key_20, StringDefines.Key_20, 510008, 0, 0, 0, 100, 2500, 0, StringDefines.Key_11070, StringDefines.Key_20));
     data.Add(11, DeclareRandTips.Create(11, StringDefines.Key_20, StringDefines.Key_20, 520045, 0, 0, 0, 100, 2500, 0, StringDefines.Key_42179, StringDefines.Key_20));
     data.Add(2, DeclareRandTips.Create(2, StringDefines.Key_20, StringDefines.Key_20, 520033, 0, 0, 0, 100, 2500, 0, StringDefines.Key_42180, StringDefines.Key_20));
     data.Add(3, DeclareRandTips.Create(3, StringDefines.Key_20, StringDefines.Key_20, 510210, 0, 0, 0, 100, 2500, 0, StringDefines.Key_42181, StringDefines.Key_20));
     data.Add(4, DeclareRandTips.Create(4, StringDefines.Key_20, StringDefines.Key_20, 510008, 0, 0, 0, 100, 2500, 0, StringDefines.Key_42182, StringDefines.Key_20));
     data.Add(5, DeclareRandTips.Create(5, StringDefines.Key_5111, StringDefines.Key_20, 0, 0, 0, 0, 100, 2500, 0, StringDefines.Key_11079, StringDefines.Key_20));
     data.Add(6, DeclareRandTips.Create(6, StringDefines.Key_20, StringDefines.Key_20, 0, 0, 55, 0, 100, 2500, 0, StringDefines.Key_42183, StringDefines.Key_20));
     data.Add(7, DeclareRandTips.Create(7, StringDefines.Key_6762, StringDefines.Key_20, 0, 0, 0, 0, 100, 2500, 0, StringDefines.Key_11090, StringDefines.Key_20));
     data.Add(8, DeclareRandTips.Create(8, StringDefines.Key_20, StringDefines.Key_20, 510201, 0, 0, 0, 100, 2500, 0, StringDefines.Key_11093, StringDefines.Key_20));
     data.Add(9, DeclareRandTips.Create(9, StringDefines.Key_20, StringDefines.Key_5131, 0, 0, 0, 0, 100, 2500, 0, StringDefines.Key_42184, StringDefines.Key_20));
     data.Add(10, DeclareRandTips.Create(10, StringDefines.Key_20, StringDefines.Key_5137, 0, 0, 0, 0, 100, 2500, 0, StringDefines.Key_42185, StringDefines.Key_20));
     data.Add(12, DeclareRandTips.Create(12, StringDefines.Key_6762, StringDefines.Key_20, 0, 0, 0, 0, 100, 2500, 0, StringDefines.Key_42186, StringDefines.Key_20));
     data.Add(13, DeclareRandTips.Create(13, StringDefines.Key_20, StringDefines.Key_6722, 0, 0, 0, 0, 100, 2500, 0, StringDefines.Key_42187, StringDefines.Key_20));
     data.Add(15, DeclareRandTips.Create(15, StringDefines.Key_10820, StringDefines.Key_20, 0, 0, 0, 0, 100, 2500, 0, StringDefines.Key_42188, StringDefines.Key_20));
     data.Add(16, DeclareRandTips.Create(16, StringDefines.Key_20, StringDefines.Key_20, 510202, 0, 0, 0, 100, 2500, 0, StringDefines.Key_42189, StringDefines.Key_20));
     data.Add(17, DeclareRandTips.Create(17, StringDefines.Key_20, StringDefines.Key_20, 510202, 0, 0, 0, 100, 2500, 0, StringDefines.Key_42190, StringDefines.Key_20));
     data.Add(14, DeclareRandTips.Create(14, StringDefines.Key_20, StringDefines.Key_10820, 0, 0, 0, 0, 100, 2500, 0, StringDefines.Key_42191, StringDefines.Key_20));
     data.Add(18, DeclareRandTips.Create(18, StringDefines.Key_20, StringDefines.Key_20, 0, 0, 0, 0, 100, 2500, 0, StringDefines.Key_11082, StringDefines.Key_20));
     data.Add(19, DeclareRandTips.Create(19, StringDefines.Key_20, StringDefines.Key_20, 0, 0, 0, 0, 100, 2500, 0, StringDefines.Key_11084, StringDefines.Key_20));
     data.Add(20, DeclareRandTips.Create(20, StringDefines.Key_20, StringDefines.Key_20, 0, 0, 0, 0, 100, 2500, 0, StringDefines.Key_11086, StringDefines.Key_20));
     data.Add(21, DeclareRandTips.Create(21, StringDefines.Key_20, StringDefines.Key_20, 0, 0, 0, 0, 100, 2500, 0, StringDefines.Key_11088, StringDefines.Key_20));
     data.Add(22, DeclareRandTips.Create(22, StringDefines.Key_20, StringDefines.Key_20, 510205, 0, 0, 0, 100, 2500, 0, StringDefines.Key_42192, StringDefines.Key_20));
 }
예제 #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[]> >("DataRandTips");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataRandTips = require 'Lua/Config/DataRandTips'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataRandTips");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareRandTips>(22);
                    foreach (var item in dic)
                    {
                        DeclareRandTips tmp = new DeclareRandTips();
                        tmp.Id                = item.Value[0];
                        tmp.OtherFinish       = CfgStringLua.Get(item.Value[1]);
                        tmp.OtherNotFinish    = CfgStringLua.Get(item.Value[2]);
                        tmp.RandFinishTask    = item.Value[3];
                        tmp.RandLevelMax      = item.Value[4];
                        tmp.RandLevelMin      = item.Value[5];
                        tmp.RandNotFinishTask = item.Value[6];
                        tmp.RandWeight        = item.Value[7];
                        tmp.ShowTime          = item.Value[8];
                        tmp.ShowType          = item.Value[9];
                        tmp.Tips              = CfgStringLua.Get(item.Value[10]);
                        tmp.TriggerParam      = CfgStringLua.Get(item.Value[11]);

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "RandTips");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclareRandTips>(22);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "RandTips");
                }
            }
        }
예제 #3
0
        public static DeclareRandTips Create(int in_id, string in_other_finish, string in_other_not_finish, int in_rand_finish_task, int in_rand_level_max, int in_rand_level_min, int in_rand_not_finish_task, int in_rand_weight, int in_show_time, int in_show_type, string in_tips, string in_trigger_param)
        {
            DeclareRandTips tmp = new DeclareRandTips();

            tmp._id                   = in_id;
            tmp._other_finish         = in_other_finish;
            tmp._other_not_finish     = in_other_not_finish;
            tmp._rand_finish_task     = in_rand_finish_task;
            tmp._rand_level_max       = in_rand_level_max;
            tmp._rand_level_min       = in_rand_level_min;
            tmp._rand_not_finish_task = in_rand_not_finish_task;
            tmp._rand_weight          = in_rand_weight;
            tmp._show_time            = in_show_time;
            tmp._show_type            = in_show_type;
            tmp._tips                 = in_tips;
            tmp._trigger_param        = in_trigger_param;

            return(tmp);
        }