Example #1
0
 public static void Convert(Dictionary <int, DeclareWing> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareWing.Create(StringDefines.Key_20, 160, StringDefines.Key_9439, StringDefines.Key_20064, StringDefines.Key_20065, 1, 10, StringDefines.Key_20066, StringDefines.Key_1791, 0, StringDefines.Key_20067, StringDefines.Key_20068, StringDefines.Key_20, 0, StringDefines.Key_20069, StringDefines.Key_20070, StringDefines.Key_20066));
     data.Add(2, DeclareWing.Create(StringDefines.Key_20071, 160, StringDefines.Key_20072, StringDefines.Key_20073, StringDefines.Key_20074, 2, 10, StringDefines.Key_20075, StringDefines.Key_1793, 0, StringDefines.Key_20067, StringDefines.Key_20076, StringDefines.Key_20, 0, StringDefines.Key_20077, StringDefines.Key_20071, StringDefines.Key_20075));
     data.Add(3, DeclareWing.Create(StringDefines.Key_20078, 160, StringDefines.Key_20079, StringDefines.Key_20080, StringDefines.Key_20081, 3, 10, StringDefines.Key_20082, StringDefines.Key_1795, 1, StringDefines.Key_20067, StringDefines.Key_20083, StringDefines.Key_20, 0, StringDefines.Key_20084, StringDefines.Key_20078, StringDefines.Key_20082));
     data.Add(4, DeclareWing.Create(StringDefines.Key_20085, 160, StringDefines.Key_20086, StringDefines.Key_20087, StringDefines.Key_20088, 4, 10, StringDefines.Key_20089, StringDefines.Key_1797, 1, StringDefines.Key_20067, StringDefines.Key_20090, StringDefines.Key_20, 0, StringDefines.Key_20091, StringDefines.Key_20085, StringDefines.Key_20089));
     data.Add(5, DeclareWing.Create(StringDefines.Key_20092, 160, StringDefines.Key_20093, StringDefines.Key_20094, StringDefines.Key_20095, 5, 10, StringDefines.Key_20096, StringDefines.Key_1799, 1, StringDefines.Key_20067, StringDefines.Key_20097, StringDefines.Key_20, 0, StringDefines.Key_20098, StringDefines.Key_20092, StringDefines.Key_20096));
     data.Add(6, DeclareWing.Create(StringDefines.Key_20099, 160, StringDefines.Key_20100, StringDefines.Key_20101, StringDefines.Key_20102, 6, 10, StringDefines.Key_20103, StringDefines.Key_1801, 1, StringDefines.Key_20067, StringDefines.Key_20104, StringDefines.Key_20, 0, StringDefines.Key_20105, StringDefines.Key_20099, StringDefines.Key_20103));
     data.Add(7, DeclareWing.Create(StringDefines.Key_20106, 160, StringDefines.Key_20107, StringDefines.Key_20108, StringDefines.Key_20109, 7, 10, StringDefines.Key_20110, StringDefines.Key_1803, 1, StringDefines.Key_20067, StringDefines.Key_20111, StringDefines.Key_20, 0, StringDefines.Key_20112, StringDefines.Key_20106, StringDefines.Key_20110));
     data.Add(8, DeclareWing.Create(StringDefines.Key_20113, 160, StringDefines.Key_20114, StringDefines.Key_20115, StringDefines.Key_20116, 8, 10, StringDefines.Key_20117, StringDefines.Key_1805, 1, StringDefines.Key_20067, StringDefines.Key_20118, StringDefines.Key_20, 0, StringDefines.Key_20119, StringDefines.Key_20113, StringDefines.Key_20117));
     data.Add(9, DeclareWing.Create(StringDefines.Key_20120, 160, StringDefines.Key_20121, StringDefines.Key_20122, StringDefines.Key_20123, 9, 10, StringDefines.Key_20124, StringDefines.Key_1807, 1, StringDefines.Key_20067, StringDefines.Key_20125, StringDefines.Key_20, 0, StringDefines.Key_20126, StringDefines.Key_20120, StringDefines.Key_20124));
     data.Add(10, DeclareWing.Create(StringDefines.Key_20127, 200, StringDefines.Key_20, StringDefines.Key_20, StringDefines.Key_20128, 10, 10, StringDefines.Key_20129, StringDefines.Key_1837, 1, StringDefines.Key_20067, StringDefines.Key_20130, StringDefines.Key_20, 0, StringDefines.Key_20130, StringDefines.Key_20127, StringDefines.Key_20129));
     data.Add(11, DeclareWing.Create(StringDefines.Key_20131, 200, StringDefines.Key_20, StringDefines.Key_20, StringDefines.Key_20132, 11, 10, StringDefines.Key_20133, StringDefines.Key_1839, 1, StringDefines.Key_20067, StringDefines.Key_20134, StringDefines.Key_20, 0, StringDefines.Key_20135, StringDefines.Key_20136, StringDefines.Key_20133));
     data.Add(12, DeclareWing.Create(StringDefines.Key_20137, 200, StringDefines.Key_20, StringDefines.Key_20, StringDefines.Key_20138, 12, 10, StringDefines.Key_20139, StringDefines.Key_1937, 1, StringDefines.Key_20067, StringDefines.Key_20140, StringDefines.Key_20, 0, StringDefines.Key_20141, StringDefines.Key_20142, StringDefines.Key_20139));
     data.Add(13, DeclareWing.Create(StringDefines.Key_20143, 200, StringDefines.Key_20, StringDefines.Key_20, StringDefines.Key_20144, 13, 10, StringDefines.Key_20145, StringDefines.Key_1939, 1, StringDefines.Key_20067, StringDefines.Key_20146, StringDefines.Key_20, 0, StringDefines.Key_20147, StringDefines.Key_20148, StringDefines.Key_20145));
     data.Add(14, DeclareWing.Create(StringDefines.Key_20149, 200, StringDefines.Key_20, StringDefines.Key_20, StringDefines.Key_20150, 14, 10, StringDefines.Key_20151, StringDefines.Key_1941, 1, StringDefines.Key_20067, StringDefines.Key_20152, StringDefines.Key_20, 0, StringDefines.Key_20153, StringDefines.Key_20154, StringDefines.Key_20151));
     data.Add(100, DeclareWing.Create(StringDefines.Key_20, 170, StringDefines.Key_20, StringDefines.Key_20, StringDefines.Key_20, 100, 0, StringDefines.Key_20155, StringDefines.Key_20156, 1, StringDefines.Key_20067, StringDefines.Key_20157, StringDefines.Key_20158, 60, StringDefines.Key_10472, StringDefines.Key_20, StringDefines.Key_20155));
     data.Add(101, DeclareWing.Create(StringDefines.Key_20, 170, StringDefines.Key_20, StringDefines.Key_20, StringDefines.Key_20, 101, 0, StringDefines.Key_20159, StringDefines.Key_20160, 1, StringDefines.Key_20067, StringDefines.Key_20161, StringDefines.Key_20162, 666, StringDefines.Key_10472, StringDefines.Key_20, StringDefines.Key_20159));
     data.Add(102, DeclareWing.Create(StringDefines.Key_20, 170, StringDefines.Key_20, StringDefines.Key_20, StringDefines.Key_20, 102, 0, StringDefines.Key_20163, StringDefines.Key_20164, 1, StringDefines.Key_20067, StringDefines.Key_20165, StringDefines.Key_20166, 6666, StringDefines.Key_10472, StringDefines.Key_20, StringDefines.Key_20163));
 }
Example #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[]> >("DataWing");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataWing = require 'Lua/Config/DataWing'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataWing");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareWing>(17);
                    foreach (var item in dic)
                    {
                        DeclareWing tmp = new DeclareWing();
                        tmp.ActiveItem    = CfgStringLua.Get(item.Value[0]);
                        tmp.CameraSize    = item.Value[1];
                        tmp.Condition     = CfgStringLua.Get(item.Value[2]);
                        tmp.ConditionInfo = CfgStringLua.Get(item.Value[3]);
                        tmp.Icon          = CfgStringLua.Get(item.Value[4]);
                        tmp.Id            = item.Value[5];
                        tmp.MaxLevel      = item.Value[6];
                        tmp.Model         = CfgStringLua.Get(item.Value[7]);
                        tmp.Name          = CfgStringLua.Get(item.Value[8]);
                        tmp.Notice        = item.Value[9];
                        tmp.QNameColor    = CfgStringLua.Get(item.Value[10]);
                        tmp.RentAtt       = CfgStringLua.Get(item.Value[11]);
                        tmp.RentInfo      = CfgStringLua.Get(item.Value[12]);
                        tmp.RentLanzuan   = item.Value[13];
                        tmp.TrainAttr     = CfgStringLua.Get(item.Value[14]);
                        tmp.TrainItem     = CfgStringLua.Get(item.Value[15]);
                        tmp.UiModel       = CfgStringLua.Get(item.Value[16]);

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "Wing");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclareWing>(17);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "Wing");
                }
            }
        }
Example #3
0
        public static DeclareWing Create(string in_active_item, int in_camera_size, string in_condition, string in_condition_info, string in_icon, int in_id, int in_max_level, string in_model, string in_name, int in_notice, string in_q_name_color, string in_rent_att, string in_rent_info, int in_rent_lanzuan, string in_train_attr, string in_train_item, string in_ui_model)
        {
            DeclareWing tmp = new DeclareWing();

            tmp._active_item    = in_active_item;
            tmp._camera_size    = in_camera_size;
            tmp._condition      = in_condition;
            tmp._condition_info = in_condition_info;
            tmp._icon           = in_icon;
            tmp._id             = in_id;
            tmp._max_level      = in_max_level;
            tmp._model          = in_model;
            tmp._name           = in_name;
            tmp._notice         = in_notice;
            tmp._q_name_color   = in_q_name_color;
            tmp._rent_att       = in_rent_att;
            tmp._rent_info      = in_rent_info;
            tmp._rent_lanzuan   = in_rent_lanzuan;
            tmp._train_attr     = in_train_attr;
            tmp._train_item     = in_train_item;
            tmp._ui_model       = in_ui_model;

            return(tmp);
        }