少年修仙传客户端代码仓库
client_Zxw
2018-09-17 6fd40421640bf7a427ca4d5cf890cc41aa3575cd
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
4个文件已修改
59 ■■■■ 已修改文件
System/OpenServerActivity/FlashSaleCoolDown.cs 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashSaleModel.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashSaleWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/LanguageVerify.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashSaleCoolDown.cs
@@ -9,6 +9,8 @@
    public class FlashSaleCoolDown : MonoBehaviour
    {
        [SerializeField] TimerBehaviour m_Time;
        [SerializeField] RectTransform m_ContainerAdvance;
        [SerializeField] Text m_AdvanceTime;
        private void OnEnable()
        {
@@ -30,20 +32,43 @@
            if (OperationTimeHepler.Instance.TryGetOperationTime(Operation.FlashSale, out operationBase))
            {
                var operation = (operationBase as OperationFlashSale);
                var seconds = operation.GetResetSurplusTime();
                if (seconds * TimeSpan.TicksPerSecond >= TimeSpan.TicksPerDay || seconds <= 0)
                bool inAdvance = false;
                var seconds = 0;
                if (operation.InAdvanceTime(TimeUtility.ServerNow))
                {
                    inAdvance = true;
                    seconds = operation.GetSecondsBeforeStart(TimeUtility.ServerNow);
                }
                else
                {
                    seconds = operation.GetResetSurplusTime();
                }
                m_ContainerAdvance.gameObject.SetActive(inAdvance);
                if (inAdvance)
                {
                    if (m_Time.gameObject.activeSelf)
                    {
                        DisplayTime(0);
                    }
                    DisplayAdvance(seconds);
                }
                else
                {
                    m_Time.timeShow.color = seconds > 3600 ? UIHelper.GetUIColor(TextColType.Green) : UIHelper.GetUIColor(TextColType.Red);
                    if (!m_Time.gameObject.activeSelf)
                    if (seconds * TimeSpan.TicksPerSecond >= TimeSpan.TicksPerDay || seconds <= 0)
                    {
                        DisplayTime(seconds);
                        if (m_Time.gameObject.activeSelf)
                        {
                            DisplayTime(0);
                        }
                    }
                    else
                    {
                        m_Time.timeShow.color = seconds > 3600 ? UIHelper.GetUIColor(TextColType.Green) : UIHelper.GetUIColor(TextColType.Red);
                        if (!m_Time.gameObject.activeSelf)
                        {
                            DisplayTime(seconds);
                        }
                    }
                }
            }
@@ -60,6 +85,11 @@
            m_Time.timeShow.color = seconds > 3600 ? UIHelper.GetUIColor(TextColType.Green) : UIHelper.GetUIColor(TextColType.Red);
            m_Time.Begin(DateTime.Now.AddTicks(seconds * TimeSpan.TicksPerSecond));
        }
        void DisplayAdvance(int seconds)
        {
            m_AdvanceTime.text = Language.Get("OperationAdvanceOpen", TimeUtility.SecondsToHMS(seconds));
        }
    }
}
System/OpenServerActivity/FlashSaleModel.cs
@@ -114,7 +114,8 @@
                OperationFlashSale operation = operationBase as OperationFlashSale;
                if (operation.InAdvanceTime(TimeUtility.ServerNow))
                {
                    SysNotifyMgr.Instance.ShowTip("InOperationTimeError");
                    var seconds = operation.GetSecondsBeforeStart(TimeUtility.ServerNow);
                    SysNotifyMgr.Instance.ShowTip("FlashSaleAdvanceLimit", TimeUtility.SecondsToHMS(seconds));
                    return;
                }
                if (!operation.InTime(TimeUtility.ServerNow))
System/OpenServerActivity/FlashSaleWin.cs
@@ -147,7 +147,7 @@
            {
                if (inAdvance)
                {
                    m_SurplusTime.text = string.Format("{0}之后开启", TimeUtility.SecondsToDHMSCHS(seconds));
                    m_SurplusTime.text = Language.Get("OperationAdvanceOpen", TimeUtility.SecondsToDHMSCHS(seconds));
                }
                else
                {
Utility/LanguageVerify.cs
@@ -150,7 +150,8 @@
    public void VerifyChat(string content, ChatInfoType channelType, Action<bool, string> callback)
    {
        int channel = 0;
        if (!requireVerify || !GetChannel(channelType, out channel) || PlayerDatas.Instance.baseData.VIPLv >= 4)
        if (!requireVerify || !GetChannel(channelType, out channel) || PlayerDatas.Instance.baseData.VIPLv >= 4
            || IsFairyFeast(channelType))
        {
            if (callback != null)
            {
@@ -343,6 +344,17 @@
        }
        return true;
    }
    bool IsFairyFeast(ChatInfoType type)
    {
        var dailyQuestModel = ModelCenter.Instance.GetModel<DailyQuestModel>();
        DailyQuestOpenTime dailyQuestOpenTime;
        if (dailyQuestModel.TryGetOpenTime((int)DailyQuestType.FairyFeast, out dailyQuestOpenTime))
        {
            return type == ChatInfoType.Fairy && dailyQuestOpenTime.InOpenTime();
        }
        return false;
    }
    public class VerifyResponse
    {