少年修仙传客户端代码仓库
client_Wu Xijin
2018-09-08 a7f5842dbe010844b87cf4781af8b658edeea145
1886 【BUG】组队自动准备BUG
4个文件已修改
60 ■■■■ 已修改文件
System/Team/MyTeamWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Team/TeamData.cs 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Team/TeamPrepareSettingWin.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Team/TeamPrepareWin.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Team/MyTeamWin.cs
@@ -200,7 +200,7 @@
        private void CancelAutoPrepare()
        {
            model.myTeam.autoPrepare.Reset();
            model.myTeam.autoPrepare.CancelAutoPrepare();
        }
        private void OnAutoAcceptInvitationValueChange(bool _value)
System/Team/TeamData.cs
@@ -71,7 +71,7 @@
                    m_Mission = value;
                    if (autoPrepare.auto && autoPrepare.cancelWhenTargetChange)
                    {
                        autoPrepare.Reset();
                        autoPrepare.CancelAutoPrepare();
                    }
                }
            }
@@ -197,7 +197,7 @@
            if (!oldInTeam && inTeam)
            {
                autoPrepare.Reset();
                autoPrepare.CancelAutoPrepare();
            }
            var newCaptainer = memberCount > 0 ? members[0].id : 0;
@@ -205,7 +205,7 @@
            {
                if (autoPrepare.auto && autoPrepare.cancelWhenCaptainerChange)
                {
                    autoPrepare.Reset();
                    autoPrepare.CancelAutoPrepare();
                }
            }
        }
@@ -521,7 +521,7 @@
        bool m_Auto = false;
        public bool auto {
            get { return m_Auto; }
            set {
            private set {
                if (m_Auto != value)
                {
                    m_Auto = value;
@@ -533,16 +533,37 @@
            }
        }
        public bool cancelWhenTargetChange = true;
        public bool cancelWhenCaptainerChange = false;
        public int mapId { get; private set; }
        public int mapEx { get; private set; }
        bool m_CancelWhenTargetChange = true;
        public bool cancelWhenTargetChange {
            get { return m_CancelWhenTargetChange; }
        }
        bool m_CancelWhenCaptainerChange = false;
        public bool cancelWhenCaptainerChange {
            get { return m_CancelWhenCaptainerChange; }
        }
        public event Action autoPrepareChangeEvent;
        public void Reset()
        public void CancelAutoPrepare()
        {
            auto = false;
            cancelWhenCaptainerChange = false;
            cancelWhenTargetChange = true;
            this.mapId = 0;
            this.mapEx = 0;
            this.m_CancelWhenCaptainerChange = false;
            this.m_CancelWhenTargetChange = true;
            this.auto = false;
        }
        public void SetAutoPreapare(int mapId, int mapEx, bool cancelWhenTargetChange, bool cancelWhenCaptainerChange)
        {
            this.mapId = mapId;
            this.mapEx = mapEx;
            this.m_CancelWhenTargetChange = cancelWhenTargetChange;
            this.m_CancelWhenCaptainerChange = cancelWhenCaptainerChange;
            this.auto = true;
        }
    }
System/Team/TeamPrepareSettingWin.cs
@@ -73,10 +73,10 @@
        private void Confirm()
        {
            model.myTeam.autoPrepare.auto = true;
            model.myTeam.autoPrepare.cancelWhenCaptainerChange = m_CaptainerSettingBuf;
            model.myTeam.autoPrepare.cancelWhenTargetChange = m_TargetSettingBuf;
            var mapId = model.myTeam.mission.mapId;
            var mapEx = model.myTeam.mission.mapEx;
            model.myTeam.autoPrepare.SetAutoPreapare(mapId,mapEx, m_TargetSettingBuf,m_CaptainerSettingBuf);
            CloseClick();
        }
System/Team/TeamPrepareWin.cs
@@ -77,9 +77,20 @@
            if (model.myTeam.autoPrepare.auto)
            {
                if (model.myTeam.autoPrepare.cancelWhenTargetChange)
                {
                    if (model.myTeam.autoPrepare.mapId == model.teamPrepare.mapId
                     && model.myTeam.autoPrepare.mapEx == model.teamPrepare.mapEx)
                    {
                Prepare();
            }
        }
                else
                {
                    Prepare();
                }
            }
        }
        protected override void OnAfterOpen()
        {