Esempio n. 1
0
 public static void Convert(Dictionary <int, DeclareHallowsModel> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareHallowsModel.Create(StringDefines.Key_50049, StringDefines.Key_50050, 1213, 1, 10, 1, StringDefines.Key_50051, StringDefines.Key_50049, StringDefines.Key_50050, StringDefines.Key_2104));
     data.Add(2, DeclareHallowsModel.Create(StringDefines.Key_50052, StringDefines.Key_50053, 1214, 2, 10, 1, StringDefines.Key_50054, StringDefines.Key_50052, StringDefines.Key_50053, StringDefines.Key_2107));
     data.Add(3, DeclareHallowsModel.Create(StringDefines.Key_50055, StringDefines.Key_50056, 1215, 3, 10, 1, StringDefines.Key_50057, StringDefines.Key_50055, StringDefines.Key_50056, StringDefines.Key_2110));
     data.Add(4, DeclareHallowsModel.Create(StringDefines.Key_50058, StringDefines.Key_50059, 1216, 4, 10, 1, StringDefines.Key_50060, StringDefines.Key_50058, StringDefines.Key_50059, StringDefines.Key_2113));
     data.Add(5, DeclareHallowsModel.Create(StringDefines.Key_50061, StringDefines.Key_50062, 1217, 5, 10, 1, StringDefines.Key_50063, StringDefines.Key_50061, StringDefines.Key_50062, StringDefines.Key_2116));
     data.Add(6, DeclareHallowsModel.Create(StringDefines.Key_50064, StringDefines.Key_50065, 1220, 6, 10, 1, StringDefines.Key_50066, StringDefines.Key_50064, StringDefines.Key_50065, StringDefines.Key_2119));
     data.Add(7, DeclareHallowsModel.Create(StringDefines.Key_50067, StringDefines.Key_50068, 1221, 7, 10, 1, StringDefines.Key_50069, StringDefines.Key_50067, StringDefines.Key_50068, StringDefines.Key_2122));
     data.Add(8, DeclareHallowsModel.Create(StringDefines.Key_50070, StringDefines.Key_50071, 1222, 8, 10, 1, StringDefines.Key_50072, StringDefines.Key_50070, StringDefines.Key_50071, StringDefines.Key_2125));
 }
Esempio n. 2
0
        public static DeclareHallowsModel Create(string in_active_attr, string in_active_item, int in_icon, int in_id, int in_max_level, int in_notice, string in_res, string in_train_attr, string in_train_item, string in_ui_Res)
        {
            DeclareHallowsModel tmp = new DeclareHallowsModel();

            tmp._active_attr = in_active_attr;
            tmp._active_item = in_active_item;
            tmp._icon        = in_icon;
            tmp._id          = in_id;
            tmp._max_level   = in_max_level;
            tmp._notice      = in_notice;
            tmp._res         = in_res;
            tmp._train_attr  = in_train_attr;
            tmp._train_item  = in_train_item;
            tmp._ui_Res      = in_ui_Res;

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

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareHallowsModel>(8);
                    foreach (var item in dic)
                    {
                        DeclareHallowsModel tmp = new DeclareHallowsModel();
                        tmp.ActiveAttr = CfgStringLua.Get(item.Value[0]);
                        tmp.ActiveItem = CfgStringLua.Get(item.Value[1]);
                        tmp.Icon       = item.Value[2];
                        tmp.Id         = item.Value[3];
                        tmp.MaxLevel   = item.Value[4];
                        tmp.Notice     = item.Value[5];
                        tmp.Res        = CfgStringLua.Get(item.Value[6]);
                        tmp.TrainAttr  = CfgStringLua.Get(item.Value[7]);
                        tmp.TrainItem  = CfgStringLua.Get(item.Value[8]);
                        tmp.UiRes      = CfgStringLua.Get(item.Value[9]);

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