Ejemplo n.º 1
0
        public static DeclareKuafuAlchemy Create(int in_double_Profit, int in_id, int in_ordinary_Profit, int in_plunder_Profit)
        {
            DeclareKuafuAlchemy tmp = new DeclareKuafuAlchemy();

            tmp._double_Profit   = in_double_Profit;
            tmp._id              = in_id;
            tmp._ordinary_Profit = in_ordinary_Profit;
            tmp._plunder_Profit  = in_plunder_Profit;

            return(tmp);
        }
Ejemplo n.º 2
0
 public static void Convert(Dictionary <int, DeclareKuafuAlchemy> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareKuafuAlchemy.Create(150, 1, 100, 114));
     data.Add(2, DeclareKuafuAlchemy.Create(150, 2, 100, 112));
     data.Add(3, DeclareKuafuAlchemy.Create(150, 3, 100, 110));
     data.Add(4, DeclareKuafuAlchemy.Create(150, 4, 100, 108));
     data.Add(5, DeclareKuafuAlchemy.Create(150, 5, 100, 106));
     data.Add(6, DeclareKuafuAlchemy.Create(150, 6, 100, 104));
     data.Add(7, DeclareKuafuAlchemy.Create(150, 7, 100, 102));
     data.Add(8, DeclareKuafuAlchemy.Create(150, 8, 100, 100));
 }
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[]> >("DataKuafuAlchemy");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataKuafuAlchemy = require 'Lua/Config/DataKuafuAlchemy'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataKuafuAlchemy");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareKuafuAlchemy>(8);
                    foreach (var item in dic)
                    {
                        DeclareKuafuAlchemy tmp = new DeclareKuafuAlchemy();
                        tmp.DoubleProfit   = item.Value[0];
                        tmp.Id             = item.Value[1];
                        tmp.OrdinaryProfit = item.Value[2];
                        tmp.PlunderProfit  = item.Value[3];

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