少年修仙传客户端代码仓库
client_linchunjie
2018-10-24 57df3bd28eca8ec7eb331effdca6f03cd024bc77
System/OpenServerActivity/OSRedEnvelopeModel.cs
@@ -103,12 +103,9 @@
        public List<int> m_AllFuncs { get; private set; }
        public int openDays { get; private set; }
        public int OSRedEnvelopeType { get; private set; }
        public int initialCount { get; private set; }
        public int addSeconds { get; private set; }
        public int limitCount { get; private set; }
        public float envelopeVoiceCD { get; private set; }
        public int addCounts { get; private set; }
        public DateTime overTime = DateTime.Now;
        public DateTime coolDownTime { get; private set; }
        void ParseConfig()
        {
            var _allCfgs = Config.Instance.GetAllValues<OSRedAchieveConfig>();
@@ -135,9 +132,7 @@
            var _cfg = Config.Instance.Get<FuncConfigConfig>("OpenServerRedPacketCfg");
            openDays = int.Parse(_cfg.Numerical1);
            initialCount = int.Parse(_cfg.Numerical2);
            addSeconds = Mathf.Max(60, int.Parse(_cfg.Numerical3));
            limitCount = int.Parse(_cfg.Numerical4);
            addCounts = int.Parse(_cfg.Numerical5);
            _cfg = Config.Instance.Get<FuncConfigConfig>("OpenServerRedPacketType");
            OSRedEnvelopeType = int.Parse(_cfg.Numerical1);
            _cfg = Config.Instance.Get<FuncConfigConfig>("RedEnvelopeVoiceCd");
@@ -429,6 +424,14 @@
            }
        }
        public bool IsAdvance
        {
            get
            {
                return false;
            }
        }
        public event Action OSRedEnvelopeInfoEnvent;
        public event Action<int> onStateUpate;
@@ -436,7 +439,6 @@
        {
            totalJadeGet = (int)_pak.MoneyNum;
            getEnvelopeTimes = _pak.GrabCnt;
            coolDownTime = TimeUtility.GetTime(_pak.StartTime);
            if (OSRedEnvelopeInfoEnvent != null)
            {
                OSRedEnvelopeInfoEnvent();
@@ -447,7 +449,7 @@
        public int cacheAchievement = 0;
        public void RequestSendAchieveEnvelope(int _id)
        {
            if (!WindowCenter.Instance.CheckOpen<OSRedEnvelopeSendWin>())
            if (!WindowCenter.Instance.IsOpen<OSRedEnvelopeSendWin>())
            {
                cacheAchievement = _id;
                WindowCenter.Instance.Open<OSRedEnvelopeSendWin>();