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

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareWingUp>(10);
                    foreach (var item in dic)
                    {
                        DeclareWingUp tmp = new DeclareWingUp();
                        tmp.Attr          = CfgStringLua.Get(item.Value[0]);
                        tmp.BlessnumLimit = item.Value[1];
                        tmp.BlessnumMax   = item.Value[2];
                        tmp.BlessnumMin   = item.Value[3];
                        tmp.Condition     = CfgStringLua.Get(item.Value[4]);
                        tmp.ConditionInfo = CfgStringLua.Get(item.Value[5]);
                        tmp.Id            = item.Value[6];
                        tmp.Notice        = item.Value[7];
                        tmp.UpItemInfo    = CfgStringLua.Get(item.Value[8]);
                        tmp.UpNumMax      = item.Value[9];
                        tmp.UpNumMin      = item.Value[10];
                        tmp.UpProbability = item.Value[11];
                        tmp.UpRoleLevel   = item.Value[12];

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "WingUp");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclareWingUp>(10);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "WingUp");
                }
            }
        }
Esempio n. 2
0
 public static void Convert(Dictionary <int, DeclareWingUp> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareWingUp.Create(StringDefines.Key_56691, 5, 5, 1, StringDefines.Key_11959, StringDefines.Key_56692, 1, 0, StringDefines.Key_56693, 1, 1, 500, 0));
     data.Add(2, DeclareWingUp.Create(StringDefines.Key_56694, 60, 6, 2, StringDefines.Key_20, StringDefines.Key_20, 2, 0, StringDefines.Key_56695, 10, 5, 400, 0));
     data.Add(3, DeclareWingUp.Create(StringDefines.Key_56696, 140, 7, 2, StringDefines.Key_12028, StringDefines.Key_56697, 3, 0, StringDefines.Key_56695, 20, 10, 300, 0));
     data.Add(4, DeclareWingUp.Create(StringDefines.Key_56698, 296, 8, 3, StringDefines.Key_20, StringDefines.Key_20, 4, 0, StringDefines.Key_56699, 37, 23, 200, 0));
     data.Add(5, DeclareWingUp.Create(StringDefines.Key_56700, 696, 8, 3, StringDefines.Key_12098, StringDefines.Key_56701, 5, 0, StringDefines.Key_56699, 87, 56, 200, 0));
     data.Add(6, DeclareWingUp.Create(StringDefines.Key_56702, 900, 9, 4, StringDefines.Key_20, StringDefines.Key_20, 6, 0, StringDefines.Key_56703, 100, 62, 200, 0));
     data.Add(7, DeclareWingUp.Create(StringDefines.Key_56704, 2200, 20, 8, StringDefines.Key_3964, StringDefines.Key_56705, 7, 0, StringDefines.Key_56703, 110, 68, 100, 0));
     data.Add(8, DeclareWingUp.Create(StringDefines.Key_56706, 2662, 22, 10, StringDefines.Key_20, StringDefines.Key_20, 8, 0, StringDefines.Key_56703, 121, 75, 50, 0));
     data.Add(9, DeclareWingUp.Create(StringDefines.Key_56707, 2926, 22, 10, StringDefines.Key_12184, StringDefines.Key_56708, 9, 0, StringDefines.Key_56709, 133, 82, 40, 0));
     data.Add(10, DeclareWingUp.Create(StringDefines.Key_56710, 3504, 24, 12, StringDefines.Key_20, StringDefines.Key_20, 10, 0, StringDefines.Key_56709, 146, 90, 30, 0));
 }
Esempio n. 3
0
        public static DeclareWingUp Create(string in_attr, int in_blessnum_limit, int in_blessnum_max, int in_blessnum_min, string in_condition, string in_condition_info, int in_id, int in_notice, string in_up_item_info, int in_up_num_max, int in_up_num_min, int in_up_probability, int in_up_role_level)
        {
            DeclareWingUp tmp = new DeclareWingUp();

            tmp._attr           = in_attr;
            tmp._blessnum_limit = in_blessnum_limit;
            tmp._blessnum_max   = in_blessnum_max;
            tmp._blessnum_min   = in_blessnum_min;
            tmp._condition      = in_condition;
            tmp._condition_info = in_condition_info;
            tmp._id             = in_id;
            tmp._notice         = in_notice;
            tmp._up_item_info   = in_up_item_info;
            tmp._up_num_max     = in_up_num_max;
            tmp._up_num_min     = in_up_num_min;
            tmp._up_probability = in_up_probability;
            tmp._up_role_level  = in_up_role_level;

            return(tmp);
        }