Ejemplo n.º 1
0
        public static DeclareGroundBuff Create(int in_activeStep, int in_activeTimes, int in_buff_id, int in_disValue, int in_groupNo, int in_id, int in_logic_body_size, int in_res)
        {
            DeclareGroundBuff tmp = new DeclareGroundBuff();

            tmp._activeStep      = in_activeStep;
            tmp._activeTimes     = in_activeTimes;
            tmp._buff_id         = in_buff_id;
            tmp._disValue        = in_disValue;
            tmp._groupNo         = in_groupNo;
            tmp._id              = in_id;
            tmp._logic_body_size = in_logic_body_size;
            tmp._res             = in_res;

            return(tmp);
        }
Ejemplo n.º 2
0
 public static void Convert(Dictionary <int, DeclareGroundBuff> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareGroundBuff.Create(3000, 1, 5000, 5, 0, 1, 100, 39));
     data.Add(2, DeclareGroundBuff.Create(3000, 1, 5001, 0, 0, 2, 100, 40));
     data.Add(3, DeclareGroundBuff.Create(3000, 1, 5002, 0, 0, 3, 100, 41));
     data.Add(4, DeclareGroundBuff.Create(1000, 30, 5004, 8, -1, 4, 8000, 62));
     data.Add(5, DeclareGroundBuff.Create(3000, 1, 5005, 2, 0, 5, 100, 39));
     data.Add(6, DeclareGroundBuff.Create(3000, 1, 5006, 2, 0, 6, 100, 40));
     data.Add(7, DeclareGroundBuff.Create(3000, 1, 5007, 2, 0, 7, 100, 41));
     data.Add(8, DeclareGroundBuff.Create(3000, 9999, 80056, 8, -1, 8, 15000, 103));
 }
Ejemplo 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[]> >("DataGroundBuff");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataGroundBuff = require 'Lua/Config/DataGroundBuff'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataGroundBuff");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareGroundBuff>(8);
                    foreach (var item in dic)
                    {
                        DeclareGroundBuff tmp = new DeclareGroundBuff();
                        tmp.ActiveStep    = item.Value[0];
                        tmp.ActiveTimes   = item.Value[1];
                        tmp.BuffId        = item.Value[2];
                        tmp.DisValue      = item.Value[3];
                        tmp.GroupNo       = item.Value[4];
                        tmp.Id            = item.Value[5];
                        tmp.LogicBodySize = item.Value[6];
                        tmp.Res           = item.Value[7];

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