Exemple #1
0
        public static DeclareKuafuAlchemySkill Create(int in_bUFF, int in_skill_id, int in_type)
        {
            DeclareKuafuAlchemySkill tmp = new DeclareKuafuAlchemySkill();

            tmp._bUFF     = in_bUFF;
            tmp._skill_id = in_skill_id;
            tmp._type     = in_type;

            return(tmp);
        }
Exemple #2
0
 public static void Convert(Dictionary <int, DeclareKuafuAlchemySkill> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(79031, DeclareKuafuAlchemySkill.Create(80089, 79031, 1));
     data.Add(79032, DeclareKuafuAlchemySkill.Create(80090, 79032, 1));
     data.Add(79033, DeclareKuafuAlchemySkill.Create(80091, 79033, 1));
     data.Add(79034, DeclareKuafuAlchemySkill.Create(80092, 79034, 1));
     data.Add(79035, DeclareKuafuAlchemySkill.Create(80085, 79035, 2));
     data.Add(79036, DeclareKuafuAlchemySkill.Create(80086, 79036, 2));
     data.Add(79037, DeclareKuafuAlchemySkill.Create(80087, 79037, 2));
     data.Add(79038, DeclareKuafuAlchemySkill.Create(80088, 79038, 2));
 }
Exemple #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[]> >("DataKuafuAlchemySkill");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataKuafuAlchemySkill = require 'Lua/Config/DataKuafuAlchemySkill'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataKuafuAlchemySkill");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareKuafuAlchemySkill>(8);
                    foreach (var item in dic)
                    {
                        DeclareKuafuAlchemySkill tmp = new DeclareKuafuAlchemySkill();
                        tmp.BUFF    = item.Value[0];
                        tmp.SkillId = item.Value[1];
                        tmp.Type    = item.Value[2];

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