少年修仙传客户端代码仓库
client_Wu Xijin
2018-08-24 41ff6b87a11c57a0a880784a2d9a5365bb80a7d6
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
8个文件已修改
238 ■■■■■ 已修改文件
Core/GameEngine/Login/Launch.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GAStaticDefine.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/PreciousItemGetBehaviour.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/MainInterfaceWin.cs 128 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/StartCoroutine/CoroutineMgr.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureModel.cs 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/VipRechargeWin.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/EnumHelper.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Login/Launch.cs
@@ -13,9 +13,11 @@
    static public LaunchStage currentStage { get { return m_CurrentStage; } }
    static float m_Progress = 0f;
    static public float progress {
    static public float progress
    {
        get { return m_Progress; }
        set {
        set
        {
            if (m_Progress != value)
            {
                m_Progress = value;
@@ -69,12 +71,9 @@
    IEnumerator Co_Lanuch()
    {
#if !UNITY_EDITOR
        if (VersionConfig.Get().versionAuthority == VersionAuthority.Release)
        {
            while (!SDKUtility.Instance.InitFinished)
            {
                yield return null;
            }
        }
#endif
        var cpu = 2;
Fight/GameActor/GAStaticDefine.cs
@@ -389,8 +389,12 @@
                }
            }
            //Debug.LogFormat("{0} 攻击 {1}, 境界: {2} <=> {3}, 是否产生了压制: {4}",
            //    caster.ServerInstID, target.ServerInstID, _casterRealm, _targetRealm, _casterRealm > _targetRealm);
            if (attackType == (int)HurtAttackType.Suppress)
            {
                _casterRealm = 1;
                _targetRealm = 0;
                _pattern = (PopUpNum.Pattern)(((int)HurtAttackType.Normal - 1) * 3);
            }
            var popupInfo = new PopUpNum.PopupInfo()
            {
System/KnapSack/PreciousItemGetBehaviour.cs
@@ -43,7 +43,6 @@
        public void ShowItem()
        {
            m_PreciousItem.gameObject.SetActive(false);
            if (model.currentShowItem != default(PreciousItemGetModel.PreciousItem))
            {
                var itemModel = playerPack.GetItemModelByGUID(model.currentShowItem.guid);
@@ -62,6 +61,14 @@
                        m_PreciousItem.gameObject.SetActive(true);
                    }
                }
                else
                {
                    m_PreciousItem.gameObject.SetActive(false);
                }
            }
            else
            {
                m_PreciousItem.gameObject.SetActive(false);
            }
            model.isGetNewItem = false;
        }
System/MainInterfacePanel/MainInterfaceWin.cs
@@ -98,13 +98,11 @@
        [SerializeField] TeamInvitationEntrance m_TeamInvitationEntrance;
        #region
        private float switcherTime = 0;//主界面自动切换时间
        private int mapId = 0;
        public delegate void OnChatCallback();//聊天回调
        public static event OnChatCallback Event_ChatCallback;
        public delegate void OnDuplicates(bool _bool, float _speed);
        public static event OnDuplicates Event_Duplicates;
        public static event Action<bool> SitEvent;//关于打坐的回调
        #endregion
        private List<int> ListBossMapId = new List<int>();//用于boss区域地图id
@@ -139,10 +137,8 @@
        #region Built-in
        protected override void BindController()
        {
            switcherTime = int.Parse(Config.Instance.Get<FuncConfigConfig>("AutomaticSwitch").Numerical1);
            recordPositionBool = true;
            m_TaskAndTeamPanel.localPosition = TaskListTipAnchor1.localPosition;
            // m_LowSettingTipGroup.localPosition = m_position2_L.localPosition;
            m_CastSkillTip.localPosition = m_position1_S.localPosition;
            m_CastSkillTip.GetComponent<CanvasGroup>().DOFade(1, 0);
            m_MailObj.SetActive(true);
@@ -206,7 +202,6 @@
            CheckChatTipOpen();
            PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;
            FunctionUnlockFlyObject.functionUnLockShowBeginEvent += UnFlodFunctionArea;
            CoroutineMgr.Instance.MaininterCDTimeEvent += OnMaininterCDTime;
            fairyModel.UpdateFairyRequestEvent += UpdateFairyRequest;
            GA_Hero.OnEnterOrExitArea += OnEnterOrExitArea;
            NewBieCenter.Instance.guideBeginEvent += OnGuideBegin;
@@ -244,7 +239,6 @@
        protected override void OnAfterOpen()
        {
            bool IsSitBool = PlayerDatas.Instance.hero != null && MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Dazuo);//是否在打坐区域
            bool IsBossBool = PlayerDatas.Instance.hero != null && MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);//是否在Boss区域
            if (onMainModel.IsDead || (onMainModel.IsBossAreaTask && !IsBossBool))
            {
@@ -317,7 +311,7 @@
                }
                else
                {
                    if (!IsSitBool && !IsBossBool)
                    if (!IsBossBool)
                    {
                        CopyOfThePanel.localPosition = CopyOfThePosition1.localPosition;
                        CopyOfThePositionBool = true;
@@ -359,7 +353,6 @@
            horseRidBool = false;
            PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting;
            FunctionUnlockFlyObject.functionUnLockShowBeginEvent -= UnFlodFunctionArea;
            CoroutineMgr.Instance.MaininterCDTimeEvent -= OnMaininterCDTime;
            fairyModel.UpdateFairyRequestEvent -= UpdateFairyRequest;
            GA_Hero.OnEnterOrExitArea -= OnEnterOrExitArea;
            NewBieCenter.Instance.guideBeginEvent -= OnGuideBegin;
@@ -493,10 +486,6 @@
                    TaskSwithButton();
                    onMainModel.IsBossAreaTask = true;
                }
                if (_areaType == MapArea.E_Type.Dazuo && _enter && SitEvent != null)
                {
                    SitEvent(true);
                }
                if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) < 5)
                {
                    if (NewBieCenter.Instance.inGuiding)
@@ -529,11 +518,6 @@
                    }
                    m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
                    m_BossBriefInfos.Unfold(false);
                    if (SitEvent != null)
                    {
                        SitEvent(false);
                    }
                }
            }
        }
@@ -664,47 +648,35 @@
            var inDungeon = IsDungeon();
            bool IsBossBool = PlayerDatas.Instance.hero == null ? false : MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);//是否在Boss区域
            bool IsSitBool = PlayerDatas.Instance.hero == null ? false : MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Dazuo);//是否在打坐区域
            var isNeutralMap = GeneralConfig.Instance.neutralMaps.Contains(PlayerDatas.Instance.baseData.MapID);
            if (!recordPositionBool)
            {
                if (inDungeon || IsBossBool || IsSitBool || isNeutralMap)
                if (inDungeon || IsBossBool || isNeutralMap)
                {
                    if (IsSitBool && SitEvent != null)
                    {
                        SitEvent(true);
                    }
                    CopyOfThePanel.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
                    if (IsCopyOfThePanel != null)
                    {
                        IsCopyOfThePanel(false);
                    }
                    m_ContainerBossList.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
                    m_BossBriefInfos.Unfold(false);
                    if (Event_Duplicates != null && inDungeon)
                    {
                        Event_Duplicates(false, CopyOfThePanelSpeed);
                    }
                    CopyOfThePanel.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
                    m_ContainerBossList.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
                    m_BossBriefInfos.Unfold(false);
                }
                if (!IsBossBool && !IsSitBool)
                if (!IsBossBool)
                {
                    if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2 && !inDungeon)
                    {
                        CopyOfThePanel.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
                        if (IsCopyOfThePanel != null)
                        {
                            IsCopyOfThePanel(true);
                        }
                        CopyOfThePanel.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
                        m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
                        m_BossBriefInfos.Unfold(false);
                        if (SitEvent != null)
                        {
                            SitEvent(false);
                        }
                    }
                }
                m_ImageRotation.DOLocalRotate(Vector3.zero, SwitchSkillTipAndButtonTipSpeed);
@@ -763,17 +735,12 @@
        {
            var inDungeon = IsDungeon();
            bool IsBossBool = MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);
            bool IsSitBool = MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Dazuo);
            var isNeutralMap = GeneralConfig.Instance.neutralMaps.Contains(PlayerDatas.Instance.baseData.MapID);
            if (recordPositionBool)//显示功能入口
            {
                if (inDungeon || IsBossBool || IsSitBool || isNeutralMap)
                if (inDungeon || IsBossBool || isNeutralMap)
                {
                    if (IsSitBool && SitEvent != null)
                    {
                        SitEvent(false);
                    }
                    CopyOfThePanel.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
                    if (IsCopyOfThePanel != null)
                    {
@@ -787,7 +754,7 @@
                        Event_Duplicates(true, CopyOfThePanelSpeed);
                    }
                }
                if (!IsBossBool && !IsSitBool)
                if (!IsBossBool)
                {
                    if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2 && !inDungeon)
                    {
@@ -798,11 +765,6 @@
                        }
                        m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
                        m_BossBriefInfos.Unfold(false);
                        if (SitEvent != null)
                        {
                            SitEvent(false);
                        }
                    }
                }
                m_ImageRotation.DOLocalRotate(Vec3, SwitchSkillTipAndButtonTipSpeed);
@@ -814,12 +776,8 @@
            }
            else//显示默认
            {
                if (inDungeon || IsBossBool || IsSitBool || isNeutralMap)
                if (inDungeon || IsBossBool || isNeutralMap)
                {
                    if (IsSitBool && SitEvent != null)
                    {
                        SitEvent(true);
                    }
                    CopyOfThePanel.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
                    if (IsCopyOfThePanel != null)
                    {
@@ -833,7 +791,7 @@
                        Event_Duplicates(false, CopyOfThePanelSpeed);
                    }
                }
                if (!IsBossBool && !IsSitBool)
                if (!IsBossBool)
                {
                    if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2 && !inDungeon)
                    {
@@ -844,11 +802,6 @@
                        }
                        m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
                        m_BossBriefInfos.Unfold(false);
                        if (SitEvent != null)
                        {
                            SitEvent(false);
                        }
                    }
                }
                m_ImageRotation.DOLocalRotate(Vector3.zero, SwitchSkillTipAndButtonTipSpeed);
@@ -953,22 +906,16 @@
        {
            if (_unflod)
            {
                if (Vector3.Distance(m_CastSkillTip.localPosition, m_position1_S.localPosition) <= 1)
                if (Vector3.Distance(m_CastSkillTip.localPosition, m_position1_S.localPosition) <= 1)//技能面板展开状态
                {
                    m_AnimationFadeOut.ImmediatelyAppear();
                    m_CastSkillTip.localPosition = m_position2_S.localPosition;
                    m_MailObj.SetActive(false);
                    m_ImageRotation.DOLocalRotate(Vec3, SwitchSkillTipAndButtonTipSpeed);
                    recordPositionBool = false;
                    _MarkRay.gameObject.SetActive(true);
                    ShowBtnGroup();//显示按钮组隐藏技能组(强制切换)
                }
                if (Vector3.Distance(m_TaskAndTeamPanel.localPosition, TaskListTipAnchor1.localPosition) > 5)
                if (Vector3.Distance(m_TaskAndTeamPanel.localPosition, TaskListTipAnchor1.localPosition) > 5)//任务面板
                {
                    TaskSwithButton();
                    onMainModel.IsBossAreaTask = false;
                }
                if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2)
                if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2)//上层面板
                {
                    CopyOfThePanel.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
                    m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
@@ -982,19 +929,11 @@
            }
            else
            {
                if (Vector3.Distance(m_CastSkillTip.localPosition, m_position2_S.localPosition) <= 1)
                if (Vector3.Distance(m_CastSkillTip.localPosition, m_position2_S.localPosition) <= 1)//技能面板收起状态
                {
                    m_AnimationFadeOut.FadeAtOnce();
                    m_CastSkillTip.localPosition = m_position1_S.localPosition;
                    m_MailObj.SetActive(true);
                    m_CastSkillTip.GetComponent<CanvasGroup>().DOFade(1, 0);
                    m_ImageRotation.DOLocalRotate(Vector3.zero, SwitchSkillTipAndButtonTipSpeed);
                    recordPositionBool = true;
                    _MarkRay.gameObject.SetActive(false);
                    ShowCastSkill();//显示技能组,隐藏按钮组(强制切换)
                }
                m_HighSettingTip.ShowButtonNow();
                //   m_HighSettingTip.ColseButtonNow();
                if (_skillGroup != 0)
                {
                    m_SkillContainer.skillTurnplate.SwitchGroup(_skillGroup);
@@ -1006,15 +945,9 @@
        {
            if (AchievementGoto.achievementType == AchievementGoto.ExcuteSkill)
            {
                if (m_AnimationFadeOut.GetIsFadeIn())
                if (Vector3.Distance(m_CastSkillTip.localPosition, m_position2_S.localPosition) <= 1)//技能面板收起状态
                {
                    m_AnimationFadeOut.FadeAtOnce();
                    m_CastSkillTip.localPosition = m_position1_S.localPosition;
                    m_MailObj.SetActive(true);
                    m_CastSkillTip.GetComponent<CanvasGroup>().DOFade(1, 0);
                    m_ImageRotation.DOLocalRotate(Vector3.zero, SwitchSkillTipAndButtonTipSpeed);
                    recordPositionBool = true;
                    _MarkRay.gameObject.SetActive(false);
                    ShowCastSkill();//显示技能组隐藏按钮组(强制切换)
                }
                var _cfg = Config.Instance.Get<SuccessConfig>(AchievementGoto.guideAchievementId);
                var _skillId = ModelCenter.Instance.GetModel<AchievementModel>().FindSkillByJob(_cfg.Condition, PlayerDatas.Instance.baseData.Job);
@@ -1062,17 +995,30 @@
        public void IsShowButtonGroup()
        {
            if (Vector3.Distance(m_CastSkillTip.localPosition, m_position1_S.localPosition) <= 1)
            if (Vector3.Distance(m_CastSkillTip.localPosition, m_position1_S.localPosition) <= 1)//技能面板展示
            {
                m_AnimationFadeOut.ImmediatelyAppear();
                m_CastSkillTip.localPosition = m_position2_S.localPosition;
                ShowBtnGroup();//显示按钮组隐藏技能组(强制切换)
            }
        }
        private void ShowBtnGroup()//显示按钮组,隐藏技能组(强制切换)
        {
            m_AnimationFadeOut.ImmediatelyAppear();//按钮组立即出现
            m_CastSkillTip.localPosition = m_position2_S.localPosition;//技能面板切出
                m_MailObj.SetActive(false);
                m_ImageRotation.DOLocalRotate(Vec3, SwitchSkillTipAndButtonTipSpeed);
                recordPositionBool = false;
                _MarkRay.gameObject.SetActive(true);
            }
        private void ShowCastSkill()//显示技能组,隐藏按钮组(强制切换)
        {
            m_AnimationFadeOut.FadeAtOnce();//功能面板立刻隐藏
            m_CastSkillTip.localPosition = m_position1_S.localPosition;//技能面板立即出现
            m_MailObj.SetActive(true);
            m_CastSkillTip.GetComponent<CanvasGroup>().DOFade(1, 0);
            m_ImageRotation.DOLocalRotate(Vector3.zero, SwitchSkillTipAndButtonTipSpeed);
            recordPositionBool = true;
            _MarkRay.gameObject.SetActive(false);
        }
    }
System/StartCoroutine/CoroutineMgr.cs
@@ -8,7 +8,6 @@
public class CoroutineMgr : SingletonMonobehaviour<CoroutineMgr>
{
    public event Action MaininterCDTimeEvent;//主界面CD时间
    public event Action MainHighTipCdTimeEvent;//主界面上层切换CD时间
  
    public void OnMainStartCorUp(float _waitingTime)//顶层面板切换协程开启
@@ -20,24 +19,6 @@
        _ControlBoolA = false;
        StopCoroutine("TheUpperPanel");
    }
    IEnumerator SwitchPanel(float _waitingTime)//用于主界面的面板切换
    {
        if (NewBieCenter.Instance.inGuiding)
        {
            yield break;
        }
        yield return new WaitForSeconds(_waitingTime);
        if (MaininterCDTimeEvent != null)
        {
            MaininterCDTimeEvent();
        }
        WindowCenter.Instance.Get<MainInterfaceWin>().MarkRayButton();
    }
    bool _ControlBoolA = false;
    IEnumerator TheUpperPanel(float _waitingTime)//用于主界面的顶层切换
    {
System/Treasure/TreasureModel.cs
@@ -245,6 +245,7 @@
            FuncOpen.Instance.OnFuncStateChangeEvent += OnFunctionStateChange;
            packageModel.RefreshItemCountAct += OnPackageItemChange;
            WindowCenter.Instance.windowAfterOpenEvent += OnWindowOpen;
            NewBieCenter.Instance.guideCompletedEvent += GuideComplete;
        }
        public override void UnInit()
@@ -252,6 +253,7 @@
            achievementModel.achievementProgressUpdateEvent -= OnAchievementProgressUpdate;
            achievementModel.achievementAwardableEvent -= OnAchievementAwardable;
            achievementModel.achievementCompletedEvent -= OnAchievementCompleted;
            NewBieCenter.Instance.guideCompletedEvent -= GuideComplete;
            DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent -= OnGetSkillLevelUpResult;
            PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= OnTreasurePotentialSPChange;
@@ -525,17 +527,7 @@
                            newGotTreasureId = id;
                            treasureEntranceShowId = id;
                            var mapConfig = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID);
                            if (mapConfig.MapFBType == (int)MapType.OpenCountry)
                            {
                                if (WindowCenter.Instance.CheckOpen<MainInterfaceWin>())
                                {
                                    if (PreFightMission.Instance.IsFinished())
                                    {
                                        WindowCenter.Instance.Open<TreasureNewGotWin>();
                                    }
                                }
                            }
                            OpenTreasureNewGot();
                        }
                        if (treasureCollectingShowId == id)
@@ -845,13 +837,7 @@
        {
            if (_window is MainInterfaceWin)
            {
                if (newGotTreasureId != 0)
                {
                    if (PreFightMission.Instance.IsFinished())
                    {
                        WindowCenter.Instance.Open<TreasureNewGotWin>();
                    }
                }
                SnxxzGame.Instance.StartCoroutine(Co_OpenTreasureNewGot());
                if (needDisplayReguluLevelUp)
                {
                    CheckReguluPop();
@@ -859,6 +845,44 @@
            }
        }
        void GuideComplete(int _id)
        {
            SnxxzGame.Instance.StartCoroutine(Co_OpenTreasureNewGot());
        }
        IEnumerator Co_OpenTreasureNewGot()
        {
            yield return WaitingForSecondConst.WaitMS600;
            OpenTreasureNewGot();
        }
        public void CheckOpenTreasureNewGot()
        {
            SnxxzGame.Instance.StartCoroutine(Co_OpenTreasureNewGot());
        }
        private void OpenTreasureNewGot()
        {
            if (!(StageManager.Instance.CurrentStage is DungeonStage) || !serverInited)
            {
                return;
            }
            if (!PreFightMission.Instance.IsFinished() || newGotTreasureId == 0
                || NewBieCenter.Instance.inGuiding || !WindowCenter.Instance.CheckOpen<MainInterfaceWin>()
                || WindowCenter.Instance.ExitAnyFullScreenOrMaskWinLEqual(WindowType.Base)
                || WindowCenter.Instance.CheckOpen<TreasureNewGotWin>())
            {
                return;
            }
            var dungeonModel = ModelCenter.Instance.GetModel<DungeonModel>();
            var mapId = dungeonModel.GetDungeonDataIdByMapId(PlayerDatas.Instance.baseData.MapID);
            if (mapId == 41110)
            {
                return;
            }
            WindowCenter.Instance.Open<TreasureNewGotWin>();
        }
        private void UpdateSkillLevelUpRedpoint(int _treasureId)
        {
            if (treasures.ContainsKey(_treasureId))
System/Vip/VipRechargeWin.cs
@@ -133,6 +133,7 @@
            if (!WindowJumpMgr.Instance.IsJumpState)
            {
                WindowCenter.Instance.Open<MainInterfaceWin>();
                ModelCenter.Instance.GetModel<TreasureModel>().CheckOpenTreasureNewGot();
            }
        }
        #endregion
Utility/EnumHelper.cs
@@ -1292,7 +1292,9 @@
    /** 闪避 */
    Miss,
    /** 免疫 */
    Immune
    Immune,
    /** 压制 */
    Suppress
}
public enum E_PlayerState