少年修仙传客户端代码仓库
client_Zxw
2019-01-23 3872572042b19c36f4403993440546115d9de844
5927 【前端】【1.5.100】XX巡礼支持活动配置
2个文件已修改
63 ■■■■ 已修改文件
System/OpenServerActivity/AchievementActivityWin.cs 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/SpringFestivalModel.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/AchievementActivityWin.cs
@@ -9,7 +9,8 @@
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI {
namespace Snxxz.UI
{
    //成就活动面板
    public class AchievementActivityWin : Window
    {
@@ -20,6 +21,9 @@
        [SerializeField] Button _LeftBtn;
        [SerializeField] Button _RightBtn;
        [SerializeField] FunctionButton m_OpenServiceAchievementBtn;//周狂欢
        [SerializeField] FunctionButton m_SpringFestival;//春节活动
        OpenServiceAchievementModel openServiceAchievementModel { get { return ModelCenter.Instance.GetModel<OpenServiceAchievementModel>(); } }
        SpringFestivalModel springFestivalModel { get { return ModelCenter.Instance.GetModel<SpringFestivalModel>(); } }
        protected override void BindController()
        {
        }
@@ -30,6 +34,7 @@
            _LeftBtn.AddListener(OnClickLeftBtn);
            _RightBtn.AddListener(OnClickRight);
            m_OpenServiceAchievementBtn.AddListener(OpenServiceAchievementButton);
            m_SpringFestival.AddListener(SpringFestivalButton);
        }
        protected override void OnPreOpen()
@@ -38,8 +43,16 @@
            {
                WindowCenter.Instance.Close<MainInterfaceWin>();
            }
            functionOrder = 0;
            if (openServiceAchievementModel.IsOpen)
            {
                functionOrder = 0;
            }
            else if (springFestivalModel.IsOpenFeatures())
            {
                functionOrder = 1;
            }
        }
        protected override void OnActived()
@@ -47,8 +60,8 @@
            FuncBtnGroup.TriggerByOrder(functionOrder);
        }
        protected override void OnAfterOpen()
        {
        {
        }
        protected override void OnPreClose()
@@ -84,10 +97,19 @@
            {
                WindowCenter.Instance.CloseImmediately<OpenServiceAchievementWin>();
            }
            if (WindowCenter.Instance.IsOpen<SpringFestivalWin>())
            {
                WindowCenter.Instance.CloseImmediately<SpringFestivalWin>();
            }
        }
        private void OpenServiceAchievementButton()
        {
            if (!openServiceAchievementModel.IsOpen)
            {
                SysNotifyMgr.Instance.ShowTip("OutofActivityTime");
                return;
            }
            CloseChild();
            if (windowState == WindowState.Opened)
            {
@@ -99,6 +121,25 @@
            }
            functionOrder = 0;
        }
        private void SpringFestivalButton()
        {
            if (!springFestivalModel.IsOpenFeatures())
            {
                SysNotifyMgr.Instance.ShowTip("OutofActivityTime");
                return;
            }
            CloseChild();
            if (windowState == WindowState.Opened)
            {
                WindowCenter.Instance.OpenWithoutAnimation<SpringFestivalWin>();
            }
            else
            {
                WindowCenter.Instance.Open<SpringFestivalWin>(true);
            }
            functionOrder = 1;
        }
        #endregion
    }
System/OpenServerActivity/SpringFestivalModel.cs
@@ -76,15 +76,15 @@
                    int Index = dit.ActionType.FindIndex(s => s.TemplateID == taskList.TemplateID);
                    if (Index != -1)
                    {
                        dit.ActionType[Index].CurTimes = taskList.CurTimes;
                        dit.ActionType[Index].GotTimes = taskList.GotTimes;
                        dit.ActionType[Index].CurTimes = (int)taskList.CurTimes;
                        dit.ActionType[Index].GotTimes = (int)taskList.GotTimes;
                    }
                    else
                    {
                        ActionTypeClass ActionType = new ActionTypeClass();
                        ActionType.TemplateID = taskList.TemplateID;
                        ActionType.CurTimes = taskList.CurTimes;
                        ActionType.GotTimes = taskList.GotTimes;
                        ActionType.CurTimes = (int)taskList.CurTimes;
                        ActionType.GotTimes = (int)taskList.GotTimes;
                        dit.ActionType.Add(ActionType);
                    }
                }
@@ -98,8 +98,8 @@
                    var Task = DayInfo.TaskList[k];
                    ActionTypeClass ActionType = new ActionTypeClass();
                    ActionType.TemplateID = Task.TemplateID;
                    ActionType.CurTimes = Task.CurTimes;
                    ActionType.GotTimes = Task.GotTimes;
                    ActionType.CurTimes = (int)Task.CurTimes;
                    ActionType.GotTimes = (int)Task.GotTimes;
                    WeekPartyDayInfo.ActionType.Add(ActionType);
                }
                SpringFestivalInfoDic.Add((int)DayInfo.DayIndex, WeekPartyDayInfo);