少年修仙传客户端代码仓库
client_linchunjie
2018-09-17 cf05425741e1f06fc5cee500706fb36e3db8a344
3442运营活动修改
16个文件已修改
310 ■■■■ 已修改文件
System/BossReborn/BossRebornModel.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashSaleModel.cs 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/ImpactRankModel.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/OSGiftModel.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/OSRedEnvelopeModel.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/FairyJadeInvestmentModel.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/LimitedTimePackageModel.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/OSTimeLimitGiftModel.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Welfare/ConsumeRebateModel.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Welfare/GiftPackageClass.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Welfare/MultipleExpModel.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Welfare/MultipleRealmPointModel.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Welfare/OperationBase.cs 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Welfare/OperationConsumeRebate.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Welfare/OperationFlashSale.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Welfare/OperationTimeHepler.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/BossReborn/BossRebornModel.cs
@@ -101,8 +101,16 @@
            get {
                return OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.BossReborn);
            }
        }
        }
        public bool IsAdvance
        {
            get
            {
                return OperationTimeHepler.Instance.SatisfyAdvanceCondition(Operation.BossReborn);
            }
        }
        public void UpdateTaskBaseInfos(HAB04_tagMCBossRebornInfo.tagMCBossRebornTaskInfo[] _tasks)
        {
            foreach (var task in _tasks)
System/OpenServerActivity/FlashSaleModel.cs
@@ -11,6 +11,7 @@
        {
            OperationTimeHepler.Instance.operationStartEvent += OperationStartEvent;
            OperationTimeHepler.Instance.operationEndEvent += OperationEndEvent;
            OperationTimeHepler.Instance.operationAdvanceEvent += OperationAdvanceEvent;
            TimeMgr.Instance.OnDayEvent += OnDayEvent;
            OpenServerActivityCenter.Instance.Register(4, this);
        }
@@ -28,6 +29,7 @@
        {
            OperationTimeHepler.Instance.operationStartEvent -= OperationStartEvent;
            OperationTimeHepler.Instance.operationEndEvent -= OperationEndEvent;
            OperationTimeHepler.Instance.operationAdvanceEvent -= OperationAdvanceEvent;
            TimeMgr.Instance.OnDayEvent -= OnDayEvent;
        }
@@ -36,6 +38,17 @@
            if (type == Operation.FlashSale && state == 0)
            {
                UpdateRedpoint();
                if (onStateUpate != null)
                {
                    onStateUpate(4);
                }
            }
        }
        private void OperationAdvanceEvent(Operation type)
        {
            if (type == Operation.FlashSale)
            {
                if (onStateUpate != null)
                {
                    onStateUpate(4);
@@ -73,9 +86,7 @@
        {
            get
            {
                OperationBase operationBase;
                OperationTimeHepler.Instance.TryGetOperationTime(Operation.FlashSale, out operationBase);
                return operationBase != null && operationBase.SatisfyOpenCondition() && operationBase.InTime(TimeUtility.ServerNow);
                return OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.FlashSale);
            }
        }
@@ -87,12 +98,24 @@
            }
        }
        public bool IsAdvance
        {
            get
            {
                return OperationTimeHepler.Instance.SatisfyAdvanceCondition(Operation.FlashSale);
            }
        }
        public void SendBuyFlashSale(OperationFlashSale.FlashSaleGift gift)
        {
            OperationBase operationBase;
            if (OperationTimeHepler.Instance.TryGetOperationTime(Operation.FlashSale, out operationBase))
            {
                OperationFlashSale operation = operationBase as OperationFlashSale;
                if (operation.InAdvanceTime(TimeUtility.ServerNow))
                {
                    return;
                }
                if (!operation.InTime(TimeUtility.ServerNow))
                {
                    SysNotifyMgr.Instance.ShowTip("ActiveOutTime");
System/OpenServerActivity/ImpactRankModel.cs
@@ -670,6 +670,14 @@
                return TimeUtility.OpenDay < openServerRankDays && FuncOpen.Instance.IsFuncOpen(125);
            }
        }
        public bool IsAdvance
        {
            get
            {
                return false;
            }
        }
        #endregion
    }
@@ -729,7 +737,7 @@
        {
            if (openServerActivitys.ContainsKey(_funcOrder))
            {
                return openServerActivitys[_funcOrder].IsOpen;
                return openServerActivitys[_funcOrder].IsOpen || openServerActivitys[_funcOrder].IsAdvance;
            }
            return false;
        }
@@ -765,6 +773,7 @@
    public interface IOpenServerActivity
    {
        bool IsOpen { get; }
        bool IsAdvance { get; }
        bool priorityOpen { get; }
        event Action<int> onStateUpate;
System/OpenServerActivity/OSGiftModel.cs
@@ -76,6 +76,15 @@
        }
        public int timeOverdueGiftId { get; private set; }
        public bool IsAdvance
        {
            get
            {
                return false;
            }
        }
        public DateTime overDueTime = DateTime.Now;
        public void UpdateTime(HAA16_tagMCSuperGiftInfo package)
        {
System/OpenServerActivity/OSRedEnvelopeModel.cs
@@ -429,6 +429,14 @@
            }
        }
        public bool IsAdvance
        {
            get
            {
                return false;
            }
        }
        public event Action OSRedEnvelopeInfoEnvent;
        public event Action<int> onStateUpate;
System/Vip/FairyJadeInvestmentModel.cs
@@ -47,6 +47,13 @@
        }
    }
    public bool IsAdvance
    {
        get
        {
            return false;
        }
    }
    private bool IsRedPoint()//红点
    {
System/Vip/LimitedTimePackageModel.cs
@@ -42,6 +42,14 @@
        }
    }
    public bool IsAdvance
    {
        get
        {
            return OperationTimeHepler.Instance.SatisfyAdvanceCondition(Operation.GiftPackage);
        }
    }
    public void OnBeforePlayerDataInitialize()
    {
        IsShowPanel = false;
System/Vip/OSTimeLimitGiftModel.cs
@@ -51,6 +51,14 @@
            }
        }
        public bool IsAdvance
        {
            get
            {
                return false;
            }
        }
        public override void Init()
        {
            var _openDay = 0;
System/Welfare/ConsumeRebateModel.cs
@@ -60,6 +60,14 @@
            }
        }
        public bool IsAdvance
        {
            get
            {
                return OperationTimeHepler.Instance.SatisfyAdvanceCondition(Operation.ConsumeRebate);
            }
        }
        public bool IsRebateGot(int day, int _index)
        {
            OperationBase operationBase;
System/Welfare/GiftPackageClass.cs
@@ -11,54 +11,13 @@
        public bool TryGetGift(DateTime time, out Gift_Package flashSale)
        {
            flashSale = default(Gift_Package);
            var index = IndexOfGift(time);
            var index = IndexOfTime(time);
            index = Mathf.Min(index, giftpackage1.Count - 1);
            if (index >= 0)
            {
                flashSale = giftpackage1[index];
            }
            return index >= 0;
        }
        int IndexOfGift(DateTime time)
        {
            if (allDay)
            {
                if (!dayReset)
                {
                    return 0;
                }
                var index = IndexOfDays(time);
                switch (resetType)
                {
                    case 0:
                        return index;
                    case 1:
                        if (time.Hour < DayResetHour)
                        {
                            return Mathf.Max(0, index - 1);
                        }
                        else
                        {
                            return index;
                        }
                    default:
                        return index;
                }
            }
            else
            {
                var index = 0;
                for (int i = 0; i < times.Count; i++)
                {
                    if (times[i].InTime(time))
                    {
                        index = i;
                        break;
                    }
                }
                return index;
            }
        }
        public override bool SatisfyOpenCondition()
System/Welfare/MultipleExpModel.cs
@@ -45,7 +45,7 @@
                    {
                        for (int i = 0; i < operationBase.times.Count; i++)
                        {
                            if (operationBase.times[i].SideOfTime(TimeUtility.ServerNow) == -1)
                            if (operationBase.times[i].CompareTime(TimeUtility.ServerNow) == -1)
                            {
                                SysNotifyMgr.Instance.ShowTip("ExpActivity_Ready",
                                    operation.GetMultipleCHS(),
@@ -128,6 +128,14 @@
            }
        }
        public bool IsAdvance
        {
            get
            {
                return OperationTimeHepler.Instance.SatisfyAdvanceCondition(Operation.MultipleExp);
            }
        }
        public void SetDayRemind()
        {
            if (multipleExpRedpoint.state == RedPointState.Simple)
System/Welfare/MultipleRealmPointModel.cs
@@ -60,6 +60,14 @@
            }
        }
        public bool IsAdvance
        {
            get
            {
                return OperationTimeHepler.Instance.SatisfyAdvanceCondition(Operation.MultipRealmPoint);
            }
        }
        private void CheckReconnect()
        {
            if (!(StageManager.Instance.CurrentStage is DungeonStage))
System/Welfare/OperationBase.cs
@@ -108,6 +108,44 @@
            return (time - s).Days;
        }
        protected virtual int IndexOfTime(DateTime time, int compare = 0)
        {
            if (allDay)
            {
                if (!dayReset)
                {
                    return 0;
                }
                var index = IndexOfDays(time);
                switch (resetType)
                {
                    case 0:
                        return index;
                    case 1:
                        return time.Hour < DayResetHour ? Mathf.Max(0, index - 1) : index;
                    default:
                        return index;
                }
            }
            else
            {
                var index = 0;
                for (int i = 0; i < times.Count; i++)
                {
                    if (times[i].InTime(time))
                    {
                        index = i;
                        break;
                    }
                    if (times[i].CompareTime(TimeUtility.ServerNow) == compare)
                    {
                        index = i;
                    }
                }
                return index;
            }
        }
        public int GetSurplusTime(DateTime time)
        {
            var seconds = 0;
System/Welfare/OperationConsumeRebate.cs
@@ -64,49 +64,8 @@
            {
                return null;
            }
            var index = Mathf.Min(rebates.Count - 1, IndexOfRebates(time));
            var index = Mathf.Min(rebates.Count - 1, IndexOfTime(time));
            return rebates[index];
        }
        public int IndexOfRebates(DateTime time)
        {
            if (allDay)
            {
                if (!dayReset)
                {
                    return 0;
                }
                var index = IndexOfDays(time);
                switch (resetType)
                {
                    case 0:
                        return index;
                    case 1:
                        if (time.Hour < DayResetHour)
                        {
                            return Mathf.Max(0, index - 1);
                        }
                        else
                        {
                            return index;
                        }
                    default:
                        return index;
                }
            }
            else
            {
                var index = 0;
                for (int i = 0; i < times.Count; i++)
                {
                    if (times[i].InTime(time))
                    {
                        index = i;
                        break;
                    }
                }
                return index;
            }
        }
        public class Rebate
System/Welfare/OperationFlashSale.cs
@@ -11,54 +11,13 @@
        public bool TryGetFlashSale(DateTime time, out FlashSale flashSale)
        {
            flashSale = default(FlashSale);
            var index = IndexOfFlashSale(time);
            var index = IndexOfTime(time, inAdvanceMinute > 0 ? -1 : 0);
            index = Mathf.Min(index, flashShops.Count - 1);
            if (index >= 0)
            {
                flashSale = flashShops[index];
            }
            return index >= 0;
        }
        int IndexOfFlashSale(DateTime time)
        {
            if (allDay)
            {
                if (!dayReset)
                {
                    return 0;
                }
                var index = IndexOfDays(time);
                switch (resetType)
                {
                    case 0:
                        return index;
                    case 1:
                        if (time.Hour < DayResetHour)
                        {
                            return Mathf.Max(0, index - 1);
                        }
                        else
                        {
                            return index;
                        }
                    default:
                        return index;
                }
            }
            else
            {
                var index = 0;
                for (int i = 0; i < times.Count; i++)
                {
                    if (times[i].InTime(time))
                    {
                        index = i;
                        break;
                    }
                }
                return index;
            }
        }
        public override bool SatisfyOpenCondition()
System/Welfare/OperationTimeHepler.cs
@@ -84,7 +84,8 @@
                        }
                    }
                    if (!operation.inAdvanceNotify && operation.InAdvanceTime(TimeUtility.ServerNow))
                    if (!operation.inAdvanceNotify && operation.SatisfyOpenCondition()
                        && operation.InAdvanceTime(TimeUtility.ServerNow))
                    {
                        operation.inAdvanceNotify = true;
                        DebugEx.LogFormat("{0}  活动提前开启", (Operation)i);
@@ -427,6 +428,16 @@
            return false;
        }
        public bool SatisfyAdvanceCondition(Operation type)
        {
            OperationBase operation;
            if (TryGetOperationTime(type, out operation))
            {
                return operation.SatisfyOpenCondition() && InOperationAdvance(type);
            }
            return false;
        }
        public void ProcessConditionError(Operation type)
        {
            if (SatisfyOpenCondition(type))
@@ -596,18 +607,10 @@
        public bool InTime(DateTime time)
        {
            if (time.Hour < startHour || (time.Hour == startHour && time.Minute < startMinute))
            {
                return false;
            }
            if (time.Hour > endHour || (time.Hour == endHour && time.Minute >= endMinute))
            {
                return false;
            }
            return true;
            return CompareTime(time) == 0;
        }
        public int SideOfTime(DateTime time)
        public int CompareTime(DateTime time)
        {
            if (time.Hour < startHour || (time.Hour == startHour && time.Minute < startMinute))
            {