| //--------------------------------------------------------  | 
| //    [Author]:           第二世界  | 
| //    [  Date ]:           Saturday, October 14, 2017  | 
| //--------------------------------------------------------  | 
|   | 
| using System;  | 
| using System.Collections.Generic;  | 
| using UnityEngine;  | 
| using UnityEngine.UI;  | 
|   | 
| namespace vnxbqy.UI  | 
| {  | 
|   | 
|     public class MainInterfaceWin : Window  | 
|     {  | 
|         [SerializeField] GameObject[] ObjectsShow;  | 
|         [SerializeField] InGamePushContainer m_InGamePusher;  | 
|         [SerializeField] SkillContainer m_SkillContainer;  | 
|         [SerializeField] HeadPortraitTip m_HeadPortraitTip;  | 
|         [SerializeField] LowSettingTip m_LowSettingTip;  | 
|         [SerializeField] ChatFrame m_ChatTip;  | 
|         [SerializeField] HighSettingTip m_HighSettingTip;  | 
|         [SerializeField] HighSettingFadeInFadeOut m_HighSettingFadeInFadeOut;  | 
|         [SerializeField] TaskListTip m_TaskListTip;//任务  | 
|         [SerializeField] TopRightTip m_TopRightTip;  | 
|         [SerializeField] FunctionForecastTip m_FunctionForecastTip;//功能预告  | 
|         [SerializeField] FairyLeagueRemindBehaviour m_FairyLeagueRemind;  | 
|         [SerializeField] TeamInvitationEntrance m_TeamInvitationEntrance;  | 
|         [SerializeField] TeamApplyEntrance m_TeamApplyEntrance;  | 
|         [SerializeField] MapSwitchingBehaviour m_MapSwitchingBehaviour;  | 
|         [SerializeField] DungeonBossBriefInfoContainer m_BossBriefInfos;  | 
|         [SerializeField] RightBottomFadeInOut m_RightBottomFadeInOut;  | 
|         [SerializeField] AssistBehaviour m_AssistBehaviour;  | 
|   | 
|         [SerializeField] IntensifySmoothSlider _ExpSlider;//经验条  | 
|         [SerializeField] Button _DownButton;//查看经验数值  | 
|         [SerializeField] Text _ExpRate;//数值  | 
|         [SerializeField] UIEffect m_UIEffect_A;//经验特效  | 
|         [SerializeField] UIEffect m_UIEffect_B;//经验特效  | 
|   | 
|         [SerializeField] Button _SwitchShowBtn;//切换按钮  | 
|         [SerializeField] Button m_TaskSwithButton;//关于功能预告       | 
|         [SerializeField] Transform m_EffectTask;//任务完成特效播放位置  | 
|         [SerializeField] Transform CopyOfThePanel;  | 
|         [SerializeField] GameObject m_TaskAndTeamTip;  | 
|         [SerializeField] GameObject m_MailObj;//邮件显隐  | 
|   | 
|         [SerializeField] MainPositionTween m_MainPositionTween;  | 
|         [SerializeField] MainButtonMisc m_MainButtonMisc;  | 
|   | 
|         #region  | 
|         private float ExpValueFloat = 0;  | 
|         private bool SliderOpen = true;  | 
|   | 
|         #endregion  | 
|         private List<int> ListBossMapId = new List<int>();//用于boss区域地图id  | 
|   | 
|         PlayerMainDate onMainModel { get { return ModelCenter.Instance.GetModel<PlayerMainDate>(); } }  | 
|         TaskModel onPlayerTask { get { return ModelCenter.Instance.GetModel<TaskModel>(); } }  | 
|         BuffModel Buffmodel { get { return ModelCenter.Instance.GetModel<BuffModel>(); } }  | 
|         PKModel pKModel { get { return ModelCenter.Instance.GetModel<PKModel>(); } }  | 
|         FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } }  | 
|   | 
|         #region Built-in  | 
|         private bool IsUpdateBool = true;  | 
|         protected override void BindController()  | 
|         {  | 
|             m_MapSwitchingBehaviour.InitAwake();  | 
|             m_MailObj.SetActive(true);  | 
|             ListBossMapId.Clear();  | 
|             string strBoss = FuncConfigConfig.Get("TaskRetract").Numerical1;  | 
|             string[] bossList = ConfigParse.GetMultipleStr(strBoss);//解析出数组  | 
|             for (int i = 0; i < bossList.Length; i++)  | 
|             {  | 
|                 ListBossMapId.Add(int.Parse(bossList[i]));  | 
|             }  | 
|               | 
|         }  | 
|   | 
|         protected override void AddListeners()  | 
|         {  | 
|             UIEventTrigger.Get(_DownButton.gameObject).OnDown = DownButton;  | 
|             UIEventTrigger.Get(_DownButton.gameObject).OnUp = UpButton;  | 
|   | 
|             _SwitchShowBtn.SetListener(SwitchFunctions);  | 
|             m_TaskSwithButton.SetListener(TaskSwithButton);  | 
|         }  | 
|   | 
|         protected override void OnPreOpen()  | 
|         {  | 
|             try  | 
|             {   | 
|                 IsUpdateBool = true;  | 
|                 SliderOpen = true;  | 
|   | 
|                 m_SkillContainer.Init();  | 
|               | 
|                 m_HeadPortraitTip.Init();  | 
|                 m_LowSettingTip.Init();  | 
|                 m_ChatTip.Init();  | 
|                 m_HighSettingTip.Init();  | 
|                 m_HighSettingFadeInFadeOut.Init();  | 
|                 m_MainPositionTween.Init();  | 
|                 m_TaskListTip.Init();  | 
|                 m_TopRightTip.Init();  | 
|                 m_TeamInvitationEntrance.Init();  | 
|                 m_TeamApplyEntrance.Init();  | 
|                 m_MapSwitchingBehaviour.Init();  | 
|                 m_FairyLeagueRemind.Init();  | 
|                 m_MainButtonMisc.Init();  | 
|                 m_RightBottomFadeInOut.Init();  | 
|                 m_AssistBehaviour.Init();  | 
|   | 
|                 m_InGamePusher.Init();  | 
|                 m_BossBriefInfos.SetActive(false);  | 
|                 ArticleExperience();//关于经验条  | 
|                 CheckChatTipOpen();  | 
|                 PlayerDatas.Instance.playerDataRefreshEvent += Updatefighting;  | 
|                 FunctionUnlockFlyObject.functionUnLockShowBeginEvent += UnFlodFunctionArea;  | 
|                 FunctionalGuideCenter.Instance.beginGuideEvent += OnBeginFunctionalGuide;  | 
|                 GA_Hero.OnEnterOrExitArea += OnEnterOrExitArea;  | 
|                 NewBieCenter.Instance.guideBeginEvent += OnGuideBegin;  | 
|                 WindowCenter.Instance.windowAfterOpenEvent += WindowAfterEvent;  | 
|                 WindowCenter.Instance.windowAfterCloseEvent += WindowAfterEvent;  | 
|                 NewBieCenter.Instance.guideBeginEvent += GuideBeginEvent;  | 
|                 GlobalTimeEvent.Instance.secondEvent += secondEvent;  | 
|                 PlayerMainDate.DemonJarDamageRankWinChange += IsShowTaskPanel;  | 
|   | 
|                 ProcessCrossServerOneVsOne();  | 
|             }  | 
|             catch (Exception ex)  | 
|             {  | 
|                 OperationLogCollect.Instance.BugReportSys(ex.ToString());  | 
|                 Debug.LogError(ex);  | 
|             }  | 
|         }  | 
|   | 
|         protected override void OnActived()  | 
|         {  | 
|             m_MainPositionTween.SwitchFunctions(new MainPositionTween.SwitchParam()  | 
|             {  | 
|                 immediately = true,  | 
|                 showDefault = true,  | 
|             });  | 
|   | 
|             m_MainButtonMisc.OnActived();  | 
|             IsShowTaskPanel();//是否显示任务面板  | 
|             m_MainPositionTween.ShowTaskImmedidately(true, false);  | 
|   | 
|             if (MapUtility.IsDungeon(PlayerDatas.Instance.baseData.MapID) && PlayerDatas.Instance.baseData.MapID != 31020)  | 
|             {  | 
|                 m_FunctionForecastTip.SetActive(false);  | 
|             }  | 
|             else  | 
|             {  | 
|                 m_FunctionForecastTip.SetActive(true);  | 
|             }  | 
|   | 
|             var isNeutralMap = GeneralDefine.neutralBossMaps.Contains(PlayerDatas.Instance.baseData.MapID);  | 
|             if (isNeutralMap && !AdventureStage.Instance.IsInAdventureStage)  | 
|             {  | 
|                 m_BossBriefInfos.SetActive(true);  | 
|                 m_BossBriefInfos.Display(PlayerDatas.Instance.baseData.MapID);  | 
|                 //if (PlayerDatas.Instance.baseData.MapID == CrossServerBossModel.DATA_MAPID)  | 
|                 //{  | 
|                 //    var bosses = ModelCenter.Instance.GetModel<CrossServerBossModel>().GetShowBosses();  | 
|                 //    m_BossBriefInfos.Display(bosses);  | 
|                 //}  | 
|                 //else  | 
|                 //{  | 
|                 //    var bosses = ModelCenter.Instance.GetModel<WorldBossModel>().GetWorldBosses(PlayerDatas.Instance.baseData.MapID);  | 
|                 //    m_BossBriefInfos.Display(bosses);  | 
|                 //}  | 
|             }  | 
|             else  | 
|             {  | 
|                 m_BossBriefInfos.SetActive(false);  | 
|             }  | 
|   | 
|         }  | 
|   | 
|         protected override void OnAfterOpen()  | 
|         {  | 
|             try  | 
|             {  | 
|                 m_FunctionForecastTip.Init();  | 
|                 m_HighSettingTip.AfterOpen();  | 
|                 m_ChatTip.OnAfterOpen();  | 
|                 HandleAchievement();  | 
|   | 
|                 if (onMainModel.createAwardState == 0)  | 
|                 {  | 
|                     WindowCenter.Instance.Open<CreateRoleAwardWin>();  | 
|                 }  | 
|             }  | 
|             catch (Exception ex)  | 
|             {  | 
|                 OperationLogCollect.Instance.BugReportSys(ex.ToString());  | 
|                 Debug.LogError(ex);  | 
|             }  | 
|         }  | 
|   | 
|         protected override void OnPreClose()  | 
|         {  | 
|             m_InGamePusher.UnInit();  | 
|             m_SkillContainer.UnInit();  | 
|             m_HeadPortraitTip.UnInit();  | 
|             m_LowSettingTip.UnInit();  | 
|             m_ChatTip.UnInit();  | 
|             m_HighSettingTip.UnInit();  | 
|             m_HighSettingFadeInFadeOut.UnInit();  | 
|             m_MainPositionTween.UnInit();  | 
|             m_TaskListTip.UnInit();  | 
|             m_TopRightTip.UnInit();  | 
|             m_FunctionForecastTip.Unit();  | 
|             m_TeamInvitationEntrance.UnInit();  | 
|             m_TeamApplyEntrance.UnInit();  | 
|             m_AssistBehaviour.UnInit();  | 
|             m_FairyLeagueRemind.UnInit();  | 
|             m_MainButtonMisc.UnInit();  | 
|             m_RightBottomFadeInOut.UnInit();  | 
|   | 
|             PlayerDatas.Instance.playerDataRefreshEvent -= Updatefighting;  | 
|             FunctionUnlockFlyObject.functionUnLockShowBeginEvent -= UnFlodFunctionArea;  | 
|             FunctionalGuideCenter.Instance.beginGuideEvent -= OnBeginFunctionalGuide;  | 
|             GA_Hero.OnEnterOrExitArea -= OnEnterOrExitArea;  | 
|             NewBieCenter.Instance.guideBeginEvent -= OnGuideBegin;  | 
|             WindowCenter.Instance.windowAfterOpenEvent -= WindowAfterEvent;  | 
|             WindowCenter.Instance.windowAfterCloseEvent -= WindowAfterEvent;  | 
|             NewBieCenter.Instance.guideBeginEvent -= GuideBeginEvent;  | 
|             GlobalTimeEvent.Instance.secondEvent -= secondEvent;  | 
|             PlayerMainDate.DemonJarDamageRankWinChange -= IsShowTaskPanel;  | 
|         }  | 
|   | 
|         protected override void LateUpdate()  | 
|         {  | 
|             base.LateUpdate();  | 
|   | 
|             var judge1 = PlayerDatas.Instance.hero != null  | 
|              && PlayerDatas.Instance.hero.State == E_ActorState.AutoRun  | 
|              && onMainModel.MoveBool;  | 
|   | 
|             var judge2 = WindowCenter.Instance.IsOpen<PathfindingIconWin>();  | 
|             if (judge1 && !judge2)  | 
|             {  | 
|                 WindowCenter.Instance.Open<PathfindingIconWin>(true);  | 
|             }  | 
|             if (!judge1 && judge2)  | 
|             {  | 
|                 onMainModel.MoveBool = false;  | 
|                 WindowCenter.Instance.Close<PathfindingIconWin>();  | 
|             }  | 
|   | 
|             if (onPlayerTask.TaskOverBool)  | 
|             {  | 
|                 onPlayerTask.TaskOverBool = false;  | 
|                 EffectMgr.Instance.PlayUIEffect(1100, 1100, m_EffectTask, false);  | 
|             }  | 
|   | 
|         }  | 
|   | 
|         protected override void OnAfterClose()  | 
|         {  | 
|   | 
|         }  | 
|         #endregion  | 
|   | 
|         private void secondEvent()  | 
|         {  | 
|             if (IsUpdateBool && gameObject.activeInHierarchy)  | 
|             {  | 
|                 StartCoroutine(featureNoticeModel.WhetherToPlayTheBox());//功能预告  | 
|                 IsUpdateBool = false;  | 
|             }  | 
|         }  | 
|   | 
|         private void GuideBeginEvent()  | 
|         {  | 
|             var show = NewBieCenter.Instance.inGuiding  | 
|                 && (NewBieCenter.Instance.currentGuide == 89  | 
|                 || NewBieCenter.Instance.currentGuide == TrialDungeonModel.TRIALEXCHANGE_GUIDE);  | 
|   | 
|             if (show)  | 
|             {  | 
|                 UnFlodFunctionArea(true, 0);  | 
|             }  | 
|         }  | 
|   | 
|         private void OnGuideBegin()//引导开始  | 
|         {  | 
|             m_MainPositionTween.ShowTaskImmedidately(true, true);  | 
|         }  | 
|   | 
|         private void OnEnterOrExitArea(MapArea.E_Type _areaType, bool _enter)  | 
|         {  | 
|             if (PlayerDatas.Instance.baseData.MapID == 10040 && _areaType != MapArea.E_Type.Boss && _enter)  | 
|             {  | 
|                 DTCA202_tagMCAttackMode.Send_SwitchAttackMode((E_AttackMode)onMainModel.AreaState);  | 
|             }  | 
|   | 
|             if ((_areaType == MapArea.E_Type.Neutral || _areaType == MapArea.E_Type.Boss) && _enter)  | 
|             {  | 
|                 WindowCenter.Instance.Open<NeutralMarkWin>();  | 
|                 AtkTypeChange();  | 
|             }  | 
|   | 
|             if (_areaType == MapArea.E_Type.Neutral && !_enter)  | 
|             {  | 
|                 if (Buffmodel.PkType != onMainModel.AreaState)  | 
|                 {  | 
|                     DTCA202_tagMCAttackMode.Send_SwitchAttackMode((E_AttackMode)onMainModel.AreaState);  | 
|                 }  | 
|             }  | 
|   | 
|             //m_MainPositionTween.SwitchFunctions(new MainPositionTween.SwitchParam() { showDefault = true, immediately = false });  | 
|         }  | 
|   | 
|         private void AtkTypeChange()//骑宠争夺是否切换状态  | 
|         {  | 
|             var mapID = PlayerDatas.Instance.baseData.MapID;  | 
|             var config = MapConfig.Get(mapID);  | 
|             var atkInt = pKModel.GetArea(config.AtkType);  | 
|             var IsBossBool = MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);//是否在Boss区域  | 
|   | 
|             if (!onMainModel.ShieldedArea.Contains(PlayerDatas.Instance.baseData.MapID))//前四只Boss和活动Boss特殊处理  | 
|             {  | 
|                 if (IsBossBool && atkInt.Count > 1 && Buffmodel.PkType != 7)  | 
|                 {  | 
|                     onMainModel.AreaState = Buffmodel.PkType;  | 
|                     DTCA202_tagMCAttackMode.Send_SwitchAttackMode((E_AttackMode)7);  | 
|                 }  | 
|             }  | 
|         }  | 
|   | 
|         void DownButton(GameObject go)  | 
|         {  | 
|             _ExpRate.SetActive(true);  | 
|         }  | 
|   | 
|         void UpButton(GameObject go)  | 
|         {  | 
|             _ExpRate.SetActive(false);  | 
|         }  | 
|   | 
|         void TaskSwithButton()  | 
|         {  | 
|             m_MainPositionTween.ShowTask(!MainPositionTween.taskShow, false, true);  | 
|         }  | 
|   | 
|         void SwitchFunctions()  | 
|         {  | 
|             m_MainPositionTween.SwitchFunctions(new MainPositionTween.SwitchParam()  | 
|             {  | 
|                 showDefault = !MainPositionTween.isDefaultState,  | 
|                 immediately = false,  | 
|                 manual = true,  | 
|             }  | 
|             );  | 
|   | 
|         }  | 
|   | 
|         // 前期战斗用强制设置任务位置逻辑  | 
|         public void ForceShowTaskPanel()  | 
|         {  | 
|             m_MainPositionTween.ShowTaskImmedidately(true, true);  | 
|         }  | 
|   | 
|         void ArticleExperience()//关于经验条  | 
|         {  | 
|             int NowLv = (int)PlayerDatas.Instance.baseData.LV;  | 
|             if (PlayerLVConfig.Get(NowLv) != null)  | 
|             {  | 
|                 ulong maxValue = (ulong)PlayerLVConfig.GetExpByPlayerLv(NowLv);  | 
|                 ulong nowVlaue = (ulong)PlayerDatas.Instance.baseData.TotalExp + (ulong)PlayerDatas.Instance.baseData.ExpPoint * 100000000;  | 
|                 if (SliderOpen)  | 
|                 {  | 
|                     _ExpSlider.delay = 0;  | 
|                     _ExpSlider.stage = NowLv;  | 
|                     _ExpSlider.ResetStage();  | 
|                     ExpValueFloat = ((float)nowVlaue / (float)maxValue);  | 
|                     _ExpSlider.value = (float)ExpValueFloat;  | 
|                     SliderOpen = false;  | 
|                 }  | 
|                 else  | 
|                 {  | 
|                     if (NowLv - _ExpSlider.stage >= 15)  | 
|                     {  | 
|                         _ExpSlider.delay = 0;  | 
|                     }  | 
|                     else  | 
|                     {  | 
|                         _ExpSlider.delay = 0.1f;  | 
|                     }  | 
|                     ExpValueFloat = ((float)nowVlaue / (float)maxValue);  | 
|                     int MapID = PlayerDatas.Instance.baseData.MapID;  | 
|                     if (ExpValueFloat != _ExpSlider.value && MapID == 31080)  | 
|                     {  | 
|                         m_UIEffect_A.Play();  | 
|                         if (m_UIEffect_A.IsPlaying)  | 
|                         {  | 
|                             if (!m_UIEffect_B.IsPlaying)  | 
|                             {  | 
|                                 m_UIEffect_B.Play();  | 
|                             }  | 
|                         }  | 
|                     }  | 
|                     _ExpSlider.stage = NowLv;  | 
|                     _ExpSlider.value = (float)ExpValueFloat;  | 
|                 }  | 
|                 if ((float)Math.Round((double)nowVlaue / maxValue, 2, MidpointRounding.AwayFromZero) >= 1f)  | 
|                 {  | 
|                     _ExpRate.text = "99.9%";  | 
|                 }  | 
|                 else  | 
|                 {  | 
|                     _ExpRate.text = (float)Math.Round((double)nowVlaue / maxValue, 2, MidpointRounding.AwayFromZero) * 100 + "%";  | 
|                 }  | 
|             }  | 
|         }  | 
|   | 
|         void Updatefighting(PlayerDataType _tCDBPlayerRefresh)//数据的刷新  | 
|         {  | 
|             ArticleExperience();//关于经验条  | 
|             if (_tCDBPlayerRefresh == PlayerDataType.LV)  | 
|             {  | 
|                 IsUpdateBool = true;  | 
|             }  | 
|   | 
|             if (_tCDBPlayerRefresh == PlayerDataType.ExAttr5)//判断是否再跨服  | 
|             {  | 
|                 ProcessCrossServerOneVsOne();  | 
|             }  | 
|         }  | 
|   | 
|         private void UnFlodFunctionArea(bool _unflod, int _skillGroup)  | 
|         {  | 
|             if (NewBieCenter.Instance.inGuiding)  | 
|             {  | 
|                 if (NewBieCenter.Instance.IsAreaNeedUnflod(1))  | 
|                 {  | 
|                     m_MainPositionTween.ShowTaskImmedidately(true, true);  | 
|                 }  | 
|   | 
|                 if (NewBieCenter.Instance.IsAreaNeedUnflod(2))  | 
|                 {  | 
|                     m_MainPositionTween.SwitchFunctions(new MainPositionTween.SwitchParam() { showDefault = true, immediately = false });  | 
|                     m_HighSettingFadeInFadeOut.SwitchImmedidately(true);  | 
|                 }  | 
|             }  | 
|             else  | 
|             {  | 
|                 m_MainPositionTween.SwitchFunctions(new MainPositionTween.SwitchParam()  | 
|                 {  | 
|                     bottomState = _unflod ? MainPositionTween.RightBottomState.Function : MainPositionTween.RightBottomState.Skill,  | 
|                     showDefault = true,  | 
|                     immediately = false  | 
|                 });  | 
|             }  | 
|   | 
|             m_SkillContainer.skillTurnplate.SwitchGroup(_skillGroup);  | 
|         }  | 
|   | 
|         private void OnBeginFunctionalGuide(int guideId)  | 
|         {  | 
|             if (FunctionalGuideCenter.Instance.IsAreaNeedUnflod(1))  | 
|             {  | 
|                 m_MainPositionTween.ShowTaskImmedidately(true, true);  | 
|             }  | 
|   | 
|             if (FunctionalGuideCenter.Instance.IsAreaNeedUnflod(2))  | 
|             {  | 
|                 m_MainPositionTween.SwitchFunctions(new MainPositionTween.SwitchParam() { showDefault = false, immediately = false });  | 
|                 m_HighSettingFadeInFadeOut.SwitchImmedidately(true);  | 
|             }  | 
|         }  | 
|   | 
|         void HandleAchievement()  | 
|         {  | 
|             if (AchievementGoto.achievementType == AchievementGoto.ExcuteSkill)  | 
|             {  | 
|                 m_MainPositionTween.SwitchFunctions(new MainPositionTween.SwitchParam()  | 
|                 {  | 
|                     showDefault = true,  | 
|                     immediately = true  | 
|                 });  | 
|   | 
|                 var config = SuccessConfig.Get(AchievementGoto.guideAchievementId);  | 
|                 var skillId = SkillConfig.FindSkillByJob(config.Condition, PlayerDatas.Instance.baseData.Job);  | 
|                 if (skillId != 0)  | 
|                 {  | 
|                     if (ModelCenter.Instance.GetModel<SkillModel>().GetXpSkillID() != skillId)  | 
|                     {  | 
|                         return;  | 
|                     }  | 
|   | 
|                     if (PlayerDatas.Instance.hero.SkillMgr.Get(skillId).cd > 0)  | 
|                     {  | 
|                         ServerTipDetails.DisplayNormalTip(Language.Get("SkillCooling_Z"));  | 
|                     }  | 
|                     else  | 
|                     {  | 
|                         //var _effect = AchievementGuideEffectPool.Require(3);  | 
|                         //_effect.transform.SetParentEx(m_SkillContainer.skillXP.transform, Vector3.zero, Vector3.zero, Vector3.one);  | 
|                     }  | 
|                     AchievementGoto.achievementType = 0;  | 
|                 }  | 
|                 else  | 
|                 {  | 
|                     AchievementGoto.achievementType = 0;  | 
|                 }  | 
|             }  | 
|         }  | 
|   | 
|         void CheckChatTipOpen()  | 
|         {  | 
|             bool _chatWinOpen = WindowCenter.Instance.IsOpen<ChatWin>();  | 
|             if (CrossServerUtility.IsCrossServerOneVsOne())  | 
|             {  | 
|                 m_ChatTip.SetActive(false);  | 
|             }  | 
|             else  | 
|             {  | 
|                 m_ChatTip.SetActive(!_chatWinOpen);  | 
|             }  | 
|         }  | 
|   | 
|         private void WindowAfterEvent(Window _win)  | 
|         {  | 
|             if (_win is ChatWin)  | 
|             {  | 
|                 CheckChatTipOpen();  | 
|             }  | 
|         }  | 
|   | 
|         private void IsShowTaskPanel()//是否显示任务面板  | 
|         {  | 
|             var hideTask = AdventureStage.Instance.IsInAdventureStage  | 
|                 || (MapUtility.IsDungeon(PlayerDatas.Instance.baseData.MapID))  | 
|                 || CrossServerUtility.IsCrossServer()  | 
|                 || ClientCrossServerOneVsOne.isClientCrossServerOneVsOne  | 
|                 || WindowCenter.Instance.IsOpen<DemonJarDamageRankWin>()  | 
|                 || WindowCenter.Instance.IsOpen<BossRebornHurtRankWin>();  | 
|   | 
|   | 
|   | 
|             if (hideTask)  | 
|             {  | 
|                 m_TaskAndTeamTip.SetActive(false);  | 
|                 m_TaskSwithButton.SetActive(false);  | 
|             }  | 
|             else  | 
|             {  | 
|                 m_TaskAndTeamTip.SetActive(true);  | 
|                 m_TaskSwithButton.SetActive(true);  | 
|             }  | 
|         }  | 
|   | 
|         private void BossGrabHintEvent()  | 
|         {  | 
|             IsShowTaskPanel();  | 
|             AtkTypeChange();  | 
|         }  | 
|   | 
|         private void ProcessCrossServerOneVsOne()  | 
|         {  | 
|             if (CrossServerUtility.IsCrossServerOneVsOne() || ArenaManager.IsArenaStage())//是否再跨服副本中  | 
|             {  | 
|                 if (ArenaManager.IsArenaStage())  | 
|                 {  | 
|                     if (ArenaManager.OnILPKWinShow != null)  | 
|                         ArenaManager.OnILPKWinShow(true);  | 
|                 }  | 
|                 if (CrossServerUtility.IsCrossServerOneVsOne())  | 
|                 {  | 
|                     WindowCenter.Instance.Open<FightingPKWin>();  | 
|                 }  | 
|   | 
|                 m_HeadPortraitTip.SetActive(false);  | 
|                 CopyOfThePanel.SetActive(false);  | 
|                 _SwitchShowBtn.SetActive(false);  | 
|                 m_TopRightTip.ShowMiniMap(false);  | 
|                 m_ChatTip.SetActive(false);  | 
|                 m_FunctionForecastTip.SetActive(false);  | 
|                 m_TaskSwithButton.SetActive(false);  | 
|                 m_InGamePusher.SetActive(false);  | 
|                 IsShowTaskPanel();  | 
|                 m_MailObj.SetActive(false);  | 
|                 foreach (var obj in ObjectsShow)  | 
|                 {  | 
|                     obj.SetActive(false);  | 
|                 }  | 
|                 m_MainPositionTween.SwitchFunctions(  | 
|                     new MainPositionTween.SwitchParam()  | 
|                     {  | 
|                         showDefault = true,  | 
|                         immediately = true,  | 
|                         bottomState = MainPositionTween.RightBottomState.Skill,  | 
|                         manual = true,  | 
|                     });  | 
|             }  | 
|             else  | 
|             {  | 
|                 if (ArenaManager.OnILPKWinShow != null)  | 
|                     ArenaManager.OnILPKWinShow(false);  | 
|   | 
|                 WindowCenter.Instance.Close<FightingPKWin>();  | 
|                 m_HeadPortraitTip.SetActive(true);  | 
|                 CopyOfThePanel.SetActive(true);  | 
|                 _SwitchShowBtn.SetActive(true);  | 
|                 m_TopRightTip.ShowMiniMap(true);  | 
|                 m_ChatTip.SetActive(true);  | 
|                 m_FunctionForecastTip.SetActive(true);  | 
|                 m_TaskSwithButton.SetActive(true);  | 
|                 m_InGamePusher.SetActive(true);  | 
|                 m_MailObj.SetActive(true);  | 
|                 foreach (var obj in ObjectsShow)  | 
|                 {  | 
|                     obj.SetActive(true);  | 
|                 }  | 
|                 if (WindowCenter.Instance.IsOpen<FightingPKWin>())  | 
|                 {  | 
|                     WindowCenter.Instance.Close<FightingPKWin>();  | 
|                 }  | 
|             }  | 
|         }  | 
|   | 
|     }  | 
| } |