Esempio n. 1
0
        public static DeclareRechargeAward Create(int in_awardType, string in_equipAward, string in_fightPower, int in_id, string in_itemAward, string in_modleId, int in_needRecharge, int in_radio, string in_rewardDes)
        {
            DeclareRechargeAward tmp = new DeclareRechargeAward();

            tmp._awardType    = in_awardType;
            tmp._equipAward   = in_equipAward;
            tmp._fightPower   = in_fightPower;
            tmp._id           = in_id;
            tmp._itemAward    = in_itemAward;
            tmp._modleId      = in_modleId;
            tmp._needRecharge = in_needRecharge;
            tmp._radio        = in_radio;
            tmp._rewardDes    = in_rewardDes;

            return(tmp);
        }
Esempio n. 2
0
 public static void Convert(Dictionary <int, DeclareRechargeAward> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareRechargeAward.Create(0, StringDefines.Key_56270, StringDefines.Key_56271, 1, StringDefines.Key_56272, StringDefines.Key_56273, 10, 1, StringDefines.Key_56274));
     data.Add(2, DeclareRechargeAward.Create(1, StringDefines.Key_20, StringDefines.Key_56275, 2, StringDefines.Key_56276, StringDefines.Key_56277, 180, 1, StringDefines.Key_56278));
     data.Add(3, DeclareRechargeAward.Create(1, StringDefines.Key_20, StringDefines.Key_56279, 3, StringDefines.Key_56280, StringDefines.Key_56281, 300, 1, StringDefines.Key_56282));
     data.Add(4, DeclareRechargeAward.Create(1, StringDefines.Key_20, StringDefines.Key_56283, 4, StringDefines.Key_56284, StringDefines.Key_56285, 680, 1, StringDefines.Key_56286));
     data.Add(5, DeclareRechargeAward.Create(1, StringDefines.Key_20, StringDefines.Key_56287, 5, StringDefines.Key_56288, StringDefines.Key_56289, 1280, 1, StringDefines.Key_56290));
     data.Add(6, DeclareRechargeAward.Create(1, StringDefines.Key_20, StringDefines.Key_56291, 6, StringDefines.Key_56292, StringDefines.Key_56293, 2880, 1, StringDefines.Key_56294));
     data.Add(7, DeclareRechargeAward.Create(1, StringDefines.Key_56295, StringDefines.Key_56296, 7, StringDefines.Key_56297, StringDefines.Key_56298, 5000, 1, StringDefines.Key_56299));
     data.Add(8, DeclareRechargeAward.Create(1, StringDefines.Key_20, StringDefines.Key_56300, 8, StringDefines.Key_56301, StringDefines.Key_56302, 9760, 1, StringDefines.Key_56303));
     data.Add(9, DeclareRechargeAward.Create(1, StringDefines.Key_20, StringDefines.Key_56304, 9, StringDefines.Key_56305, StringDefines.Key_56306, 19800, 1, StringDefines.Key_56307));
 }
Esempio 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[]> >("DataRechargeAward");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataRechargeAward = require 'Lua/Config/DataRechargeAward'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataRechargeAward");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareRechargeAward>(9);
                    foreach (var item in dic)
                    {
                        DeclareRechargeAward tmp = new DeclareRechargeAward();
                        tmp.AwardType    = item.Value[0];
                        tmp.EquipAward   = CfgStringLua.Get(item.Value[1]);
                        tmp.FightPower   = CfgStringLua.Get(item.Value[2]);
                        tmp.Id           = item.Value[3];
                        tmp.ItemAward    = CfgStringLua.Get(item.Value[4]);
                        tmp.ModleId      = CfgStringLua.Get(item.Value[5]);
                        tmp.NeedRecharge = item.Value[6];
                        tmp.Radio        = item.Value[7];
                        tmp.RewardDes    = CfgStringLua.Get(item.Value[8]);

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