少年修仙传客户端代码仓库
client_linchunjie
2019-02-25 ba555681fb66a55e724b37510ce5a77163fb9024
Merge branch 'master' into TreasureRevise
4个文件已添加
15个文件已修改
1678 ■■■■ 已修改文件
Core/SDK/SDKUtility.cs 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/HeroAI_Auto.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/Skill/AttackHandler.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_PVPClientPlayer.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/SDKUtilityWrap.cs 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/SDKUtilityWrap.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/ClientVersion/VersionConfig.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/CrossServerOneVsOne/RankCellCtrl.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Launch/LaunchWin.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Login/LoginModel.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/MainButtonMisc.cs 386 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/MainButtonMisc.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/MainInterfaceWin.cs 923 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/MainPositionTween.cs 226 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/MainPositionTween.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/WindowBase/WindowCenter.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/ConfigInitiator.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/LogicEngine.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/RuntimeLogUtility.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/SDK/SDKUtility.cs
@@ -38,12 +38,17 @@
        get; private set;
    }
    public static string Yj_Version
    public static string ThirdPartVersion
    {
        get; private set;
    }
    public static string Yj_SpID
    {
        get; private set;
    }
    public static string ThirdPartAppID
    {
        get; private set;
    }
@@ -125,7 +130,7 @@
    {
        Yj_AppID = string.Empty;
        Yj_SpID = string.Empty;
        Yj_Version = string.Empty;
        ThirdPartVersion = string.Empty;
        RegistrationID = string.Empty;
        AssetCopyFinished = false;
        ChannelPlatform = E_ChannelPlatform.Free;
@@ -502,19 +507,19 @@
                {
                    if (_dict.Contains("xnappid"))
                    {
                        Yj_AppID = _json["xnappid"].ToString();
                        ThirdPartAppID = _json["xnappid"].ToString();
                    }
                    if (_dict.Contains("xnversion"))
                    {
                        Yj_Version = _json["xnversion"].ToString();
                        ThirdPartVersion = _json["xnversion"].ToString();
                    }
                }
                else if (ChannelPlatform == E_ChannelPlatform.Cjm)
                {
                    if (_dict.Contains("cjmappid"))
                    {
                        Yj_AppID = _json["cjmappid"].ToString();
                        ThirdPartAppID = _json["cjmappid"].ToString();
                    }
                }
@@ -920,6 +925,12 @@
        else if (ChannelPlatform == E_ChannelPlatform.Xn)
        {
            m_PaymentTable["RechargeChannel"] = "7";
            m_PaymentTable["serverName"] = ServerListCenter.Instance.currentServer.name;
            m_PaymentTable["prodCode"] = cpInfo;
            m_PaymentTable["prodName"] = title;
            m_PaymentTable["prodNum"] = "1";
            m_PaymentTable["prodPrice"] = money.ToString();
            m_PaymentTable["extraData"] = "";
        }
        else if (ChannelPlatform == E_ChannelPlatform.Cjm)
        {
@@ -980,6 +991,15 @@
                        if (ChannelPlatform == E_ChannelPlatform.Mr)
                        {
                            m_Json["notifyurl"] = _json["notifyurl"];
                        }else if(ChannelPlatform == E_ChannelPlatform.Xn)
                        {
                            if((_json as IDictionary).Contains("cpSign"))
                            {
                                m_Json["cpSign"] = _json["cpSign"];
                            }else
                            {
                                Debug.Log("没有收到cpSign: " + message);
                            }
                        }
#if UNITY_IOS
                        m_Json["identifier"] = VersionConfig.Get().bundleIdentifier;
Fight/Actor/AI/HeroAI_Auto.cs
@@ -364,7 +364,7 @@
            }
            // 移动至目标
            _hero.MoveToTarget(_atkTarget, _compareDist);
            _hero.MoveToTarget(_atkTarget, _compareDist, CrossServerUtility.IsCrossServerOneVsOne() || ClientDungeonStageUtility.isClientDungeon);
            // 判断是否需要冲锋
            if (_hero.IsNeedRush(_currentDistSqrt))
Fight/Actor/Skill/AttackHandler.cs
@@ -206,6 +206,17 @@
                        if (target.ServerInstID == PlayerDatas.Instance.PlayerId && target.ActorInfo.RealHp == 0)
                        {
                            GA_PVPClientPlayer.Result(false);
                            var _hero = target as GA_Hero;
                            if (_hero != null)
                            {
                                _hero.Die();
                                if (_hero.State == E_ActorState.AutoRun)
                                {
                                    _hero.StopPathFind();
                                }
                                _hero.StopRush();
                                _hero.Behaviour.StopHandupAI(true);
                            }
                        }
                    }
                }
Fight/GameActor/GA_PVPClientPlayer.cs
@@ -26,7 +26,6 @@
    {
#if UNITY_EDITOR
        Debug.Log(winOrLose ? "============ 赢了" : "============ 输了");
        RuntimeLogUtility.TEST_CLIENT_PVP_AI = false;
#endif
        if (OnPVPResult != null)
@@ -301,6 +300,13 @@
    private void UpdateAI()
    {
#if UNITY_EDITOR
        if (!RuntimeLogUtility.TEST_CLIENT_PVP_AI)
        {
            return;
        }
#endif
        if (dungeonModel.dungeonFightStage != DungeonFightStage.Normal
        || !doAILogic)
        {
Lua/Gen/SDKUtilityWrap.cs
@@ -107,13 +107,15 @@
            Utils.EndObjectRegister(type, L, translator, null, null,
                null, null, null);
            Utils.BeginClassRegister(type, L, __CreateInstance, 2, 4, 0);
            Utils.BeginClassRegister(type, L, __CreateInstance, 2, 6, 0);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "GetApplicationContext", _m_GetApplicationContext_xlua_st_);
            
            
            
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "Yj_AppID", _g_get_Yj_AppID);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "ThirdPartVersion", _g_get_ThirdPartVersion);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "Yj_SpID", _g_get_Yj_SpID);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "ThirdPartAppID", _g_get_ThirdPartAppID);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "Yj_BanHao", _g_get_Yj_BanHao);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "builtinAssetCopyFinished", _g_get_builtinAssetCopyFinished);
            
@@ -964,6 +966,18 @@
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_ThirdPartVersion(RealStatePtr L)
        {
            try {
                LuaAPI.lua_pushstring(L, SDKUtility.ThirdPartVersion);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_Yj_SpID(RealStatePtr L)
        {
            try {
@@ -976,6 +990,18 @@
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_ThirdPartAppID(RealStatePtr L)
        {
            try {
                LuaAPI.lua_pushstring(L, SDKUtility.ThirdPartAppID);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_Yj_BanHao(RealStatePtr L)
        {
            try {
Lua/Gen/SDKUtilityWrap.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 8843f8c727baa1e4cb02afe3a9d6061d
timeCreated: 1550120582
timeCreated: 1550657389
licenseType: Pro
MonoImporter:
  serializedVersion: 2
System/ClientVersion/VersionConfig.cs
@@ -247,7 +247,7 @@
                var input = lhsStrings[i];
                var intTemp = 0;
                int.TryParse(input, out intTemp);
                version1 += intTemp * MathUtility.Power(100, lhsStrings.Length - i);
                version1 += intTemp * MathUtility.Power(1000, lhsStrings.Length -1- i);
            }
            var version2 = 0;
@@ -256,11 +256,10 @@
                var input = rhsStrings[i];
                var intTemp = 0;
                int.TryParse(input, out intTemp);
                version2 += intTemp * MathUtility.Power(100, rhsStrings.Length - i);
                version2 += intTemp * MathUtility.Power(1000, rhsStrings.Length -1- i);
            }
            return version1 > version2 ? _lhs : _rhs;
        }
    }
System/CrossServerOneVsOne/RankCellCtrl.cs
@@ -117,7 +117,7 @@
        {
            var config = CrossServerArenaConfig.Get(Danlv);
            m_SegmentTxt.text = config.Name;
            m_SegmentTxt.color = UIHelper.GetDanLVColor(Danlv, false);
            m_SegmentTxt.color = UIHelper.GetDanLVColor(Danlv, true);
            //if (Danlv >= 24)
            //{
            //    m_SegmentTxt.color = new Color32(255, 3, 3, 255);
System/Launch/LaunchWin.cs
@@ -92,6 +92,11 @@
                m_IosProgressContainer.gameObject.SetActive(false);
            }
            if (m_StageDescription != null)
            {
                m_StageDescription.text = GetLaunchStageDescription(showStage, showStep);
            }
            UpdateProgress();
        }
@@ -111,6 +116,7 @@
        protected override void OnActived()
        {
            base.OnActived();
            if (m_TotalProgressSlider == null)
            {
                m_TotalProgressSlider = this.GetComponentInChildren<SmoothSlider>(true);
System/Login/LoginModel.cs
@@ -336,13 +336,13 @@
                    else if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Xn)
                    {
                        send.IDType = 7;
                        send.Extra += ("|" + SDKUtility.Yj_AppID + "|" + SDKUtility.Yj_Version);
                        send.Extra += ("|" + SDKUtility.ThirdPartAppID + "|" + SDKUtility.ThirdPartVersion);
                        send.ExtraLen = (byte)send.Extra.Length;
                    }
                    else if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Cjm)
                    {
                        send.IDType = 8;
                        send.Extra += ("|" + SDKUtility.Yj_AppID + "|" + SDKUtility.Instance.FreePlatformInfo.token);
                        send.Extra += ("|" + SDKUtility.ThirdPartAppID + "|" + SDKUtility.Instance.FreePlatformInfo.token);
                        send.ExtraLen = (byte)send.Extra.Length;
                    }
                    send.AccID = sdkLoginResult.account;
System/MainInterfacePanel/MainButtonMisc.cs
New file
@@ -0,0 +1,386 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Tuesday, February 19, 2019
//--------------------------------------------------------
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class MainButtonMisc : MonoBehaviour
    {
        [SerializeField] Button m_RedBag;//红包入口按钮
        [SerializeField] UIEffect m_RedpackGetSfx;
        [SerializeField] Button m_SendRedbagBtn;
        [SerializeField] MainCollectBehaviour m_CollectBehaviour;
        [SerializeField] Button m_WishingAwardImg;
        [SerializeField] Button m_MysticalPurchaseImg;
        [SerializeField] Button m_DungeonAssistImg;
        [SerializeField] RectTransform m_ContainerGotoGrabBoss;
        [SerializeField] RectTransform m_ContainerAdaptiveChat;
        [SerializeField] Button m_GotoFairyGrabBoss;
        [SerializeField] Button m_FlyToFairyGrabBoss;
        [SerializeField] Button m_FriendQuestBtn;
        [SerializeField] Button m_FairyRequestBtn;
        FestivalRedpackModel festivalRedpackModel { get { return ModelCenter.Instance.GetModel<FestivalRedpackModel>(); } }
        OSRedEnvelopeModel OSEnvelopeModel { get { return ModelCenter.Instance.GetModel<OSRedEnvelopeModel>(); } }
        PlayerRedPacketDatas redPacket { get { return ModelCenter.Instance.GetModel<PlayerRedPacketDatas>(); } }
        WishingPoolModel wishModel { get { return ModelCenter.Instance.GetModel<WishingPoolModel>(); } }
        MysticalPurchaseModel purchaseModel { get { return ModelCenter.Instance.GetModel<MysticalPurchaseModel>(); } }
        DungeonAssistModel assistModel { get { return ModelCenter.Instance.GetModel<DungeonAssistModel>(); } }
        FairyGrabBossModel fairyGrabBossModel { get { return ModelCenter.Instance.GetModel<FairyGrabBossModel>(); } }
        FriendsModel friendsModel { get { return ModelCenter.Instance.GetModel<FriendsModel>(); } }
        FairyModel fairyModel { get { return ModelCenter.Instance.GetModel<FairyModel>(); } }
        private void Start()
        {
            m_RedBag.SetListener(RedPacketButton);
            m_SendRedbagBtn.SetListener(SendRedpacketBtn);
            m_WishingAwardImg.SetListener(ClickWishAward);
            m_MysticalPurchaseImg.SetListener(ClickMysticalPurchase);
            m_DungeonAssistImg.SetListener(ClickDungeonAssist);
            m_GotoFairyGrabBoss.SetListener(GotoFairyGrabBoss);
            m_FlyToFairyGrabBoss.SetListener(FlyToFairyGrabBoss);
            m_FairyRequestBtn.SetListener(OnFairyRequestClick);
        }
        public void Init()
        {
            friendsModel.askAddFriendEvent = FriendQuestBtn;
            OnRedBagGet();//判断是否开启红包入口
            CheckSendRedpackBtn();
            ShowFairyGrabBoss();
            IsCrossServerOneVsOne();
            PlayerRedPacketDatas.OnRedBagGetEvent += OnRedBagGet;
            OSEnvelopeModel.OSRedEnvelopeUpdateEvent += OnRedBagGet;
            OSEnvelopeModel.OSRedEnvelopeInfoEnvent += OnRedBagGet;
            RedpointCenter.Instance.redpointValueChangeEvent += RedpointValueChangeEvent;
            PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;
            GA_NpcCollect.OnArrive += OnArriveCollectNPC;
            GA_NpcCollect.OnLeave += OnLeaveCollectNpc;
            wishModel.UpdateWishAwardEvent += UpdateWishAwardImag;
            purchaseModel.UpdateNewMysticalEvent += UpdateMysticalPurchaseImag;
            assistModel.UpdateRedpointEvent += UpdateDungeonAssistImag;
            fairyGrabBossModel.bossGrabHintEvent += bossGrabHintEvent;
            fairyGrabBossModel.gotoBossStateUpdate += ShowFairyGrabBoss;
            ChatTip.OnChatUpEvent += RefreshAdaptiveChat;
            fairyModel.UpdateFairyRequestEvent += UpdateFairyRequest;
        }
        public void OnActived()
        {
           RefreshAdaptiveChat();
        }
        public void Unit()
        {
            m_CollectBehaviour.Dispose();
            PlayerRedPacketDatas.OnRedBagGetEvent -= OnRedBagGet;
            OSEnvelopeModel.OSRedEnvelopeUpdateEvent -= OnRedBagGet;
            OSEnvelopeModel.OSRedEnvelopeInfoEnvent -= OnRedBagGet;
            RedpointCenter.Instance.redpointValueChangeEvent -= RedpointValueChangeEvent;
            PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting;
            GA_NpcCollect.OnArrive -= OnArriveCollectNPC;
            GA_NpcCollect.OnLeave -= OnLeaveCollectNpc;
            wishModel.UpdateWishAwardEvent -= UpdateWishAwardImag;
            purchaseModel.UpdateNewMysticalEvent -= UpdateMysticalPurchaseImag;
            assistModel.UpdateRedpointEvent -= UpdateDungeonAssistImag;
            fairyGrabBossModel.gotoBossStateUpdate -= ShowFairyGrabBoss;
            fairyGrabBossModel.bossGrabHintEvent -= bossGrabHintEvent;
            ChatTip.OnChatUpEvent -= RefreshAdaptiveChat;
            fairyModel.UpdateFairyRequestEvent -= UpdateFairyRequest;
            m_CollectBehaviour.gameObject.SetActive(false);
        }
        void Updatefighting(PlayerDataRefresh _tCDBPlayerRefresh)//数据的刷新
        {
            if (_tCDBPlayerRefresh == PlayerDataRefresh.ExAttr5)//判断是否再跨服
            {
                IsCrossServerOneVsOne();
            }
        }
        public void IsCrossServerOneVsOne()
        {
            if (CrossServerUtility.IsCrossServerOneVsOne())//是否再跨服副本中
            {
                m_RedBag.gameObject.SetActive(false);
                m_WishingAwardImg.gameObject.SetActive(false);
                m_MysticalPurchaseImg.gameObject.SetActive(false);
                m_DungeonAssistImg.gameObject.SetActive(false);
                m_FriendQuestBtn.gameObject.SetActive(false);
                m_FairyRequestBtn.gameObject.SetActive(false);
            }
            else
            {
                OnRedBagGet();
                UpdateWishAwardImag();
                UpdateMysticalPurchaseImag();
                UpdateDungeonAssistImag();
                FriendQuestBtn();
                UpdateFairyRequest();
            }
        }//再跨服状态的开关显隐控制
        private void RedpointValueChangeEvent(int _id)
        {
            if (_id == OSEnvelopeModel.m_RedAchieveRedpoint.id
                || _id == festivalRedpackModel.taskRedpoint.id)
            {
                CheckSendRedpackBtn();
            }
        }
        private void OnRedBagGet()//判断是否开启红包入口
        {
            if (m_RedpackGetSfx.IsPlaying)
            {
                m_RedpackGetSfx.StopImediatly();
            }
            var requireRedpack = (OSEnvelopeModel.CanGetEnvelope()
                || redPacket.IsRedBagGetBool || festivalRedpackModel.ExistRewardableRedpack())
                && !CrossServerUtility.IsCrossServer();
            if (requireRedpack)
            {
                m_RedBag.gameObject.SetActive(true);
                if (!m_RedpackGetSfx.IsPlaying)
                {
                    m_RedpackGetSfx.Play();
                }
            }
            else
            {
                m_RedBag.gameObject.SetActive(false);
            }
            CheckSendRedpackBtn();
        }
        private void CheckSendRedpackBtn()
        {
            m_SendRedbagBtn.gameObject.SetActive(!m_RedBag.gameObject.activeSelf && OSEnvelopeModel.m_RedAchieveRedpoint.state == RedPointState.Simple
                && festivalRedpackModel.taskRedpoint.state == RedPointState.Simple);
        }
        private void RedPacketButton()//关于红包的功能 入口
        {
            RedEnvelopeModel envelopeModel = ModelCenter.Instance.GetModel<RedEnvelopeModel>();
            RedEnvelopeModel.RedEnvelope _envelope;
            if (envelopeModel.TryGetLatestEnvelope(out _envelope))
            {
                if (festivalRedpackModel.systemRedpoint.state == RedPointState.GetReward)
                {
                    WindowCenter.Instance.Close<MainInterfaceWin>();
                    festivalRedpackModel.jumpType = 1;
                    festivalRedpackModel.autoOpen = true;
                    WindowCenter.Instance.Open<OpenServerActivityWin>(false, 19);
                }
                else if (festivalRedpackModel.receiveRedpoint.state == RedPointState.GetReward)
                {
                    WindowCenter.Instance.Close<MainInterfaceWin>();
                    festivalRedpackModel.jumpType = 3;
                    festivalRedpackModel.autoOpen = true;
                    WindowCenter.Instance.Open<OpenServerActivityWin>(false, 19);
                }
                else if (OSEnvelopeModel.m_OpenServerGetRedpin.state == RedPointState.GetReward)
                {
                    WindowCenter.Instance.Close<MainInterfaceWin>();
                    ModelCenter.Instance.GetModel<OSRedEnvelopeModel>().JumpType = 2;
                    ModelCenter.Instance.GetModel<OSRedEnvelopeModel>().autoOpen = true;
                    WindowCenter.Instance.Open<OpenServerActivityWin>(false, 2);
                }
                else
                {
                    WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.RedPacket);
                }
            }
        }
        private void SendRedpacketBtn()
        {
            if (festivalRedpackModel.taskRedpoint.state == RedPointState.Simple)
            {
                WindowCenter.Instance.Close<MainInterfaceWin>();
                festivalRedpackModel.jumpType = 2;
                WindowCenter.Instance.Open<OpenServerActivityWin>(false, 19);
            }
            else if (OSEnvelopeModel.m_RedAchieveRedpoint.state == RedPointState.Simple)
            {
                WindowCenter.Instance.Close<MainInterfaceWin>();
                ModelCenter.Instance.GetModel<OSRedEnvelopeModel>().JumpType = 1;
                WindowCenter.Instance.Open<OpenServerActivityWin>(false, 2);
            }
        }
        void OnArriveCollectNPC(uint sid, int npcID)
        {
            m_CollectBehaviour.gameObject.SetActive(true);
            m_CollectBehaviour.Display(npcID, sid);
        }
        void OnLeaveCollectNpc(uint sid, int npcID)
        {
            m_CollectBehaviour.Dispose();
            m_CollectBehaviour.gameObject.SetActive(false);
        }
        private void ClickWishAward()
        {
            WindowCenter.Instance.Open<WishingGetItemWin>();
        }
        private void UpdateWishAwardImag()
        {
            m_WishingAwardImg.gameObject.SetActive(wishModel.wishingAwardDict.Count > 0 ? true : false);
        }
        private void ClickMysticalPurchase()
        {
            WindowCenter.Instance.Open<OpenServerActivityWin>(false, (int)OpenServerActivityCenter.OSActivityType.MysticalPurchase);
        }
        private void UpdateMysticalPurchaseImag()
        {
            m_MysticalPurchaseImg.gameObject.SetActive(purchaseModel.priorityOpen);
        }
        private void ClickDungeonAssist()
        {
            WindowCenter.Instance.Open<DungeonAssistWin>();
        }
        private void UpdateDungeonAssistImag()
        {
            m_DungeonAssistImg.gameObject.SetActive(assistModel.IsNewAssistInfo);
        }
        private void ShowFairyGrabBoss()
        {
            m_ContainerGotoGrabBoss.gameObject.SetActive(fairyGrabBossModel.cacheGotoBossId != 0 &&
                !fairyGrabBossModel.grabBossHintOpen);
        }
        private void bossGrabHintEvent()
        {
            ShowFairyGrabBoss();
        }
        private void RefreshAdaptiveChat()
        {
            if (ChatTip.Inst == null)
            {
                return;
            }
            m_ContainerAdaptiveChat.sizeDelta = m_ContainerAdaptiveChat.sizeDelta.SetY(
                ChatTip.Inst.IsChatUp ? ChatTip.Inst.chatHighSize.y : ChatTip.Inst.chatLowSize.y);
        }
        private void GotoFairyGrabBoss()
        {
            if (fairyGrabBossModel.cacheGotoBossId != 0)
            {
                var error = 0;
                if (fairyGrabBossModel.TestEnterDungeon(fairyGrabBossModel.cacheGotoBossId, out error))
                {
                    if (fairyGrabBossModel.IsBossKilled(fairyGrabBossModel.cacheGotoBossId))
                    {
                        SysNotifyMgr.Instance.ShowTip("FairyGrabBossOver");
                    }
                    MapTransferUtility.Instance.MoveToNPC(fairyGrabBossModel.cacheGotoBossId);
                }
                else
                {
                    fairyGrabBossModel.DisplayErrorTip(error);
                }
            }
        }
        private void FlyToFairyGrabBoss()
        {
            if (fairyGrabBossModel.cacheGotoBossId != 0)
            {
                var error = 0;
                if (fairyGrabBossModel.TestEnterDungeon(fairyGrabBossModel.cacheGotoBossId, out error))
                {
                    var bossInfoConfig = BossInfoConfig.Get(fairyGrabBossModel.cacheGotoBossId);
                    var flyItemCount = ModelCenter.Instance.GetModel<PlayerPackModel>().GetItemCountByID(PackType.rptItem, GeneralDefine.flyBootItemId);
                    var freeFly = ModelCenter.Instance.GetModel<VipModel>().GetVipPrivilegeCnt(VipPrivilegeType.FreeTransfer) > 0;
                    if (bossInfoConfig != null)
                    {
                        if (freeFly || flyItemCount > 0)
                        {
                            MapTransferUtility.Instance.MissionFlyTo(bossInfoConfig.MapID, fairyGrabBossModel.cacheGotoBossId);
                        }
                        else
                        {
                            if (fairyGrabBossModel.flyToGrabBossRemind)
                            {
                                var money = (int)UIHelper.GetMoneyCnt(1) + (int)UIHelper.GetMoneyCnt(2);
                                if (money >= 1)
                                {
                                    FlyShoesUseCallback();
                                }
                                else
                                {
                                    WindowCenter.Instance.Open<RechargeTipWin>();
                                }
                            }
                            else
                            {
                                FlyShoseConfirmwin.useEnvironment = FlyShoseConfirmwin.UseEnvironment.FairyGrabBoss;
                                FlyShoseConfirmwin.confirmCallBack = FlyShoesUseCallback;
                                WindowCenter.Instance.Open<FlyShoseConfirmwin>();
                            }
                        }
                    }
                }
                else
                {
                    fairyGrabBossModel.DisplayErrorTip(error);
                }
            }
        }
        private void FlyShoesUseCallback()
        {
            switch (FlyShoseConfirmwin.useEnvironment)
            {
                case FlyShoseConfirmwin.UseEnvironment.FairyGrabBoss:
                    if (fairyGrabBossModel.cacheGotoBossId != 0)
                    {
                        var error = 0;
                        if (fairyGrabBossModel.TestEnterDungeon(fairyGrabBossModel.cacheGotoBossId, out error))
                        {
                            var bossInfoConfig = BossInfoConfig.Get(fairyGrabBossModel.cacheGotoBossId);
                            if (bossInfoConfig != null)
                            {
                                MapTransferUtility.Instance.MissionFlyTo(bossInfoConfig.MapID, fairyGrabBossModel.cacheGotoBossId);
                            }
                        }
                        else
                        {
                            fairyGrabBossModel.DisplayErrorTip(error);
                        }
                    }
                    break;
            }
        }
        public void FriendQuestBtn()
        {
            if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Friend))
            {
                m_FriendQuestBtn.onClick.RemoveAllListeners();
                if (friendsModel.GetFriendQuestDict().Count > 0)
                {
                    m_FriendQuestBtn.gameObject.SetActive(true);
                    m_FriendQuestBtn.onClick.AddListener(OnClickFriendQuest);
                }
                else
                {
                    m_FriendQuestBtn.gameObject.SetActive(false);
                }
            }
            else
            {
                m_FriendQuestBtn.gameObject.SetActive(false);
            }
        }
        private void OnClickFriendQuest()
        {
            WindowCenter.Instance.Open<FriendQuestWin>();
        }
        private void OnFairyRequestClick()
        {
            WindowCenter.Instance.Open<FairyInviteWin>();
        }
        private void UpdateFairyRequest()
        {
            m_FairyRequestBtn.gameObject.SetActive(fairyModel.FairyRequestRedPoint.count > 0);
        }
    }
}
System/MainInterfacePanel/MainButtonMisc.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 88710c23df84e9540a96cdcd7cb52f85
timeCreated: 1550547833
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/MainInterfacePanel/MainInterfaceWin.cs
@@ -24,155 +24,77 @@
        [SerializeField] HighSettingTip m_HighSettingTip;
        [SerializeField] TaskListTip m_TaskListTip;//任务
        [SerializeField] TopRightTip m_TopRightTip;
        [SerializeField] Button friendQuestBtn;
        [SerializeField] Button fairyRequestBtn;
        [SerializeField] FunctionForecastTip m_FunctionForecastTip;//功能预告
        [SerializeField] IsShowXpButton m_IsShowXp;//XP 技能常显                                                
        // [SerializeField] XpSkill m_XpSkill;
        [SerializeField] SkillButtonEffects m_SkillButtonEffects;
        [Header("副本面板移动速度")]
        public float CopyOfThePanelSpeed = 1f;//副本面板移动速度
        [SerializeField] Transform CopyOfThePanel;
        [SerializeField] Transform m_ContainerBossList;
        [SerializeField] FairyLeagueRemindBehaviour m_FairyLeagueRemind;
        [SerializeField] TeamInvitationEntrance m_TeamInvitationEntrance;
        [SerializeField] FairyCallMemberBehaviour m_FairyCallBehaviour;
        [SerializeField] MapSwitchingBehaviour m_MapSwitchingBehaviour;
        [SerializeField] DungeonBossBriefInfoContainer m_BossBriefInfos;
        [SerializeField] Transform CopyOfThePosition1;
        [SerializeField] Transform CopyOfThePosition2;
        [SerializeField] AnimationFadeOut m_AnimationFadeOut;
        [SerializeField] IntensifySmoothSlider _ExpSlider;//经验条
        [SerializeField] Button _DownButton;//查看经验数值
        [SerializeField] Text _ExpRate;//数值
        [SerializeField] UIEffect m_UIEffect_A;//经验特效
        [SerializeField] UIEffect m_UIEffect_B;//经验特效
        private float ExpValueFloat = 0;
        private bool SliderOpen = true;
        public float _Delaytime = 0.1f;//延迟时间
        [Header("任务面板的移动速度")]
        public float Speed = 0.2f;
        [Header("技能面板和按钮面板的移动速度")]
        public float SwitchSkillTipAndButtonTipSpeed = 0.2f;
        public float DoFade = 0.2f;
        [SerializeField] Transform m_LowSettingTipGroup;//按钮面板
        [SerializeField] Transform m_CastSkillTip;//技能面板
        [SerializeField] Transform m_position1_S;
        [SerializeField] Transform m_position2_S;
        public static bool recordPositionBool = true;
        [Header("策划要的角度")]
        public Vector3 Vec3 = new Vector3(0f, 0f, 225f);
        [SerializeField] Transform m_ImageRotation;//切换滚动
        [SerializeField] GameObject m_TaskAndTeamTip;
        [SerializeField] GameObject LeftImage;
        [SerializeField] GameObject RightImg;
        [SerializeField] Transform m_TaskAndTeamPanel;
        [SerializeField] Transform TaskListTipAnchor1;
        [SerializeField] Transform TaskListTipAnchor2;
        [SerializeField] Button m_TaskSwithButton;//关于功能预告
        [SerializeField] Transform FunctionForecastPanel;
        [SerializeField] Transform unctionForecastPosition1;
        [SerializeField] Transform unctionForecastPosition2;
        [SerializeField] MainCollectBehaviour m_CollectBehaviour;
        [SerializeField] Button m_RedBag;//红包入口按钮
        [SerializeField] UIEffect m_RedpackGetSfx;
        [SerializeField] Button m_SendRedbagBtn;
        [SerializeField] Button WishingAwardImg;
        [SerializeField] Button MysticalPurchaseImg;
        [SerializeField] Button DungeonAssistImg;
        [SerializeField] RectTransform m_ContainerGotoGrabBoss;
        [SerializeField] RectTransform m_ContainerAdaptiveChat;
        [SerializeField] Button m_GotoFairyGrabBoss;
        [SerializeField] Button m_FlyToFairyGrabBoss;
        [SerializeField] FairyLeagueRemindBehaviour m_FairyLeagueRemind;
        [SerializeField] Transform m_EffectTask;//任务完成特效播放位置
        private bool TaskSwithBool = true;
        [SerializeField] Button _SwitchShowBtn;//切换按钮
        [SerializeField] AnimationFadeOut m_AnimationFadeOut;
        [SerializeField] Button m_TaskSwithButton;//关于功能预告
        [SerializeField] Transform m_EffectTask;//任务完成特效播放位置
        [SerializeField] Transform CopyOfThePanel;
        [SerializeField] GameObject m_TaskAndTeamTip;
        [SerializeField] GameObject m_MailObj;//邮件显隐
        [SerializeField] ClickScreenOtherSpace _MarkRay;//便捷切换按钮
        [SerializeField] ClickScreenOtherSpace _MarkRay;//便捷切换按钮
        [SerializeField] TeamInvitationEntrance m_TeamInvitationEntrance;
        [SerializeField] FairyCallMemberBehaviour m_FairyCallBehaviour;
        [SerializeField] MapSwitchingBehaviour m_MapSwitchingBehaviour;
        [SerializeField] MainPositionTween m_MainPositionTween;
        [SerializeField] MainButtonMisc m_MainButtonMisc;
        #region
        private bool TaskSwithBool = true;
        private float ExpValueFloat = 0;
        private bool SliderOpen = true;
        public static bool recordPositionBool = true;
        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 Event_ChatCallback;
        public static event Action<bool, float> Event_Duplicates;
        #endregion
        private List<int> ListBossMapId = new List<int>();//用于boss区域地图id
        public static event Action<bool> IsCopyOfThePanel;
        public static event Action IsOpenMaininterface;
        public static bool CopyOfThePositionBool = true;
        RealmModel m_RealmModel;
        RealmModel realmModel { get { return m_RealmModel ?? (m_RealmModel = ModelCenter.Instance.GetModel<RealmModel>()); } }
        FairyModel m_FairyModel;
        FairyModel fairyModel { get { return m_FairyModel ?? (m_FairyModel = ModelCenter.Instance.GetModel<FairyModel>()); } }
        FriendsModel _friendsModel;
        FriendsModel friendsModel { get { return _friendsModel ?? (_friendsModel = ModelCenter.Instance.GetModel<FriendsModel>()); } }
        PlayerMountDatas m_HorseModel;
        PlayerMountDatas horsemodel { get { return m_HorseModel ?? (m_HorseModel = ModelCenter.Instance.GetModel<PlayerMountDatas>()); } }
        PlayerMainDate m_MainModel;
        PlayerMainDate onMainModel { get { return m_MainModel ?? (m_MainModel = ModelCenter.Instance.GetModel<PlayerMainDate>()); } }
        PlayerTaskDatas m_PlayerTask;
        PlayerTaskDatas onPlayerTask { get { return m_PlayerTask ?? (m_PlayerTask = ModelCenter.Instance.GetModel<PlayerTaskDatas>()); } }
        PlayerRedPacketDatas m_RedPacket;
        PlayerRedPacketDatas redPacket { get { return m_RedPacket ?? (m_RedPacket = ModelCenter.Instance.GetModel<PlayerRedPacketDatas>()); } }
        PlayerBuffDatas m_BuffModel;
        PlayerBuffDatas Buffmodel { get { return m_BuffModel ?? (m_BuffModel = ModelCenter.Instance.GetModel<PlayerBuffDatas>()); } }
        PKModel m_PKModel;
        PKModel pKModel { get { return m_PKModel ?? (m_PKModel = ModelCenter.Instance.GetModel<PKModel>()); } }
        OSRedEnvelopeModel OSEnvelopeModel { get { return ModelCenter.Instance.GetModel<OSRedEnvelopeModel>(); } }
        FestivalRedpackModel festivalRedpackModel { get { return ModelCenter.Instance.GetModel<FestivalRedpackModel>(); } }
        RealmModel realmModel { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
        PlayerMountDatas horsemodel { get { return ModelCenter.Instance.GetModel<PlayerMountDatas>(); } }
        PlayerMainDate onMainModel { get { return ModelCenter.Instance.GetModel<PlayerMainDate>(); } }
        PlayerTaskDatas onPlayerTask { get { return ModelCenter.Instance.GetModel<PlayerTaskDatas>(); } }
        PlayerBuffDatas Buffmodel { get { return ModelCenter.Instance.GetModel<PlayerBuffDatas>(); } }
        PKModel pKModel { get { return ModelCenter.Instance.GetModel<PKModel>(); } }
        RuneTowerModel runeTowerModel { get { return ModelCenter.Instance.GetModel<RuneTowerModel>(); } }
        TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
        DemonJarModel demonJarModel { get { return ModelCenter.Instance.GetModel<DemonJarModel>(); } }
        DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
        FairyGrabBossModel fairyGrabBossModel { get { return ModelCenter.Instance.GetModel<FairyGrabBossModel>(); } }
        FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } }
        WishingPoolModel wishModel { get { return ModelCenter.Instance.GetModel<WishingPoolModel>(); } }
        MysticalPurchaseModel purchaseModel { get { return ModelCenter.Instance.GetModel<MysticalPurchaseModel>(); } }
        DungeonAssistModel assistModel { get { return ModelCenter.Instance.GetModel<DungeonAssistModel>(); } }
        IceCrystalVeinModel m_IceCrystalVeinModel;
        IceCrystalVeinModel iceCrystalVeinModel { get { return m_IceCrystalVeinModel ?? (m_IceCrystalVeinModel = ModelCenter.Instance.GetModel<IceCrystalVeinModel>()); } }
        IceCrystalVeinModel iceCrystalVeinModel { get { return ModelCenter.Instance.GetModel<IceCrystalVeinModel>(); } }
        JadeDynastyTowerModel jadeDynastyTowerModel { get { return ModelCenter.Instance.GetModel<JadeDynastyTowerModel>(); } }
        #region Built-in
        private bool IsUpdateBool = true;
        protected override void BindController()
        {
            var inst = BossShowModel.Instance;
            m_MapSwitchingBehaviour.InitAwake();
            recordPositionBool = true;
            m_TaskAndTeamPanel.localPosition = TaskListTipAnchor1.localPosition;
            m_CastSkillTip.localPosition = m_position1_S.localPosition;
            m_CastSkillTip.GetComponent<CanvasGroup>().DOFade(1, 0);
            m_MailObj.SetActive(true);
            var inst = BossShowModel.Instance;
            TaskSwithBool = true;
            FunctionForecastPanel.localPosition = unctionForecastPosition1.localPosition;
            LeftImage.SetActive(true);
            RightImg.SetActive(false);
            m_MainPositionTween.SetTaskPos(true);
            m_MainPositionTween.SetFunctionForecastPos(true);
            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]));
            }
            _MarkRay.gameObject.SetActive(false);
            }
        }
        protected override void AddListeners()
@@ -180,16 +102,8 @@
            UIEventTrigger.Get(_DownButton.gameObject).OnDown = DownButton;
            UIEventTrigger.Get(_DownButton.gameObject).OnUp = UpButton;
            _MarkRay.AddListener(MarkRayButton);
            _SwitchShowBtn.AddListener(SwitchShowButton);
            m_TaskSwithButton.AddListener(TaskSwithButton);
            fairyRequestBtn.onClick.AddListener(OnFairyRequestClick);
            m_RedBag.AddListener(RedPacketButton);
            m_SendRedbagBtn.AddListener(SendRedpacketBtn);
            WishingAwardImg.AddListener(ClickWishAward);
            MysticalPurchaseImg.AddListener(ClickMysticalPurchase);
            DungeonAssistImg.AddListener(ClickDungeonAssist);
            m_GotoFairyGrabBoss.AddListener(GotoFairyGrabBoss);
            m_FlyToFairyGrabBoss.AddListener(FlyToFairyGrabBoss);
            _SwitchShowBtn.SetListener(SwitchShowButton);
            m_TaskSwithButton.SetListener(TaskSwithButton);
        }
        protected override void OnPreOpen()
@@ -200,8 +114,6 @@
            }
            IsUpdateBool = true;
            SliderOpen = true;
            horseRidBool = false;
            friendsModel.askAddFriendEvent = FriendQuestBtn;
            m_InGamePusher.Init();
            m_SkillContainer.Init();
            m_FunctionForecastTip.Init();
@@ -218,73 +130,40 @@
            m_FairyCallBehaviour.Init();
            m_MapSwitchingBehaviour.Init();
            m_FairyLeagueRemind.Init();
            m_MainButtonMisc.Init();
            m_BossBriefInfos.gameObject.SetActive(false);
            UpdateWishAwardImag();
            UpdateMysticalPurchaseImag();
            UpdateDungeonAssistImag();
            ArticleExperience();//关于经验条
            FriendQuestBtn();
            UpdateFairyRequest();
            OnRedBagGet();//关于红包入口
            CheckSendRedpackBtn();
            CheckChatTipOpen();
            ShowFairyGrabBoss();
            PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;
            FunctionUnlockFlyObject.functionUnLockShowBeginEvent += UnFlodFunctionArea;
            fairyModel.UpdateFairyRequestEvent += UpdateFairyRequest;
            GA_Hero.OnEnterOrExitArea += OnEnterOrExitArea;
            NewBieCenter.Instance.guideBeginEvent += OnGuideBegin;
            NewBieCenter.Instance.guideCompletedEvent += OnGuideCompleted;
            GA_NpcCollect.OnArrive += OnArriveCollectNPC;
            GA_NpcCollect.OnLeave += OnLeaveCollectNpc;
            PlayerRedPacketDatas.OnRedBagGetEvent += OnRedBagGet;
            WindowCenter.Instance.windowAfterOpenEvent += WindowAfterEvent;
            WindowCenter.Instance.windowAfterCloseEvent += WindowAfterEvent;
            OSEnvelopeModel.OSRedEnvelopeUpdateEvent += OnRedBagGet;
            OSEnvelopeModel.OSRedEnvelopeInfoEnvent += OnRedBagGet;
            PlayerTaskDatas.CompletionOfTaskEvent += CompletionOfTaskEvent;
            RedpointCenter.Instance.redpointValueChangeEvent += RedpointValueChangeEvent;
            NewBieCenter.Instance.guideBeginEvent += GuideBeginEvent;
            fairyGrabBossModel.bossGrabHintEvent += bossGrabHintEvent;
            wishModel.UpdateWishAwardEvent += UpdateWishAwardImag;
            assistModel.UpdateRedpointEvent += UpdateDungeonAssistImag;
            purchaseModel.UpdateNewMysticalEvent += UpdateMysticalPurchaseImag;
            fairyGrabBossModel.gotoBossStateUpdate += ShowFairyGrabBoss;
            ChatTip.OnChatUpEvent += RefreshAdaptiveChat;
            GlobalTimeEvent.Instance.secondEvent += secondEvent;
            IsCrossServerOneVsOne();
        }
        private void CompletionOfTaskEvent(int obj)
        {
            EffectMgr.Instance.PlayUIEffect(1100, 1100, m_EffectTask, false);
        }
        protected override void OnActived()
        {
            m_MainButtonMisc.OnActived();
            m_HighSettingTip.OnActived();
            IsShowTaskPanel();//是否显示任务面板
            RefreshAdaptiveChat();
        }
        IEnumerator Co_Load()
        {
            yield return null;
            WindowCenter.Instance.Open<OffLineOnHookWin>();
        }
        protected override void OnAfterOpen()
        {
            bool IsBossBool = PlayerDatas.Instance.hero != null && MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);//是否在Boss区域
            if (onMainModel.IsDead || (onMainModel.IsBossAreaTask && !IsBossBool))
            var inDungeon = IsDungeon();
            var judge1 = onMainModel.IsDead || (onMainModel.IsBossAreaTask && !IsBossBool && !m_MainPositionTween.IsTaskAndPanelShow);
            var judge2 = mapId != PlayerDatas.Instance.baseData.MapID;
            if (judge1)
            {
                if (Vector3.Distance(m_TaskAndTeamPanel.localPosition, TaskListTipAnchor1.localPosition) > 3)
                {
                    TaskSwithButton();
                }
                TaskSwithButton();
                onMainModel.IsBossAreaTask = false;
                onMainModel.IsDead = false;
            }
@@ -292,38 +171,27 @@
            {
                _MarkRay.gameObject.SetActive(true);
            }
            var inDungeon = IsDungeon();
            else
            {
                _MarkRay.gameObject.SetActive(false);
            }
            if (inDungeon)
            {
                m_FunctionForecastTip.gameObject.SetActive(false);
                if (WindowCenter.Instance.IsOpen<FunctionForecastWin>())
                if (judge2)
                {
                    WindowCenter.Instance.Close<FunctionForecastWin>();
                    SetTipPanelOrBossList(false, false);
                }
                if (mapId != PlayerDatas.Instance.baseData.MapID)
                if (m_AnimationFadeOut.GetIsFadeIn() && judge2)
                {
                    CopyOfThePanel.localPosition = CopyOfThePosition2.localPosition;
                    onMainModel.MainTopPanelShow = false;
                    CopyOfThePositionBool = false;
                    m_ContainerBossList.localPosition = CopyOfThePosition1.localPosition;
                    m_BossBriefInfos.Unfold(false);
                    if (Event_Duplicates != null)
                    {
                        Event_Duplicates(false, CopyOfThePanelSpeed);
                    }
                }
                if (m_AnimationFadeOut.GetIsFadeIn() && mapId != PlayerDatas.Instance.baseData.MapID)
                {
                    m_AnimationFadeOut.FadeAtOnce();
                    m_MailObj.SetActive(true);
                    m_CastSkillTip.localPosition = m_position1_S.localPosition;
                    m_CastSkillTip.GetComponent<CanvasGroup>().DOFade(1, 0);
                    m_MainPositionTween.SetSkillTipOrRightTipPos(true);
                    recordPositionBool = true;
                }
            }
            else
            {
                m_FunctionForecastTip.gameObject.SetActive(true);
                var isNeutralMap = GeneralDefine.neutralBossMaps.Contains(PlayerDatas.Instance.baseData.MapID);
                if (isNeutralMap)
@@ -350,43 +218,14 @@
                    m_BossBriefInfos.gameObject.SetActive(false);
                }
                if (isNeutralMap)
                if (isNeutralMap && judge2)
                {
                    if (mapId != PlayerDatas.Instance.baseData.MapID)
                    {
                        CopyOfThePanel.localPosition = CopyOfThePosition2.localPosition;
                        onMainModel.MainTopPanelShow = false;
                        if (IsCopyOfThePanel != null)
                        {
                            IsCopyOfThePanel(false);
                        }
                        CopyOfThePositionBool = false;
                        m_ContainerBossList.localPosition = CopyOfThePosition1.localPosition;
                        m_BossBriefInfos.Unfold(false);
                    }
                    SetTipPanelOrBossList(false, false);
                }
                else
                else if (!isNeutralMap && !IsBossBool)
                {
                    if (!IsBossBool)
                    {
                        CopyOfThePanel.localPosition = CopyOfThePosition1.localPosition;
                        onMainModel.MainTopPanelShow = true;
                        CopyOfThePositionBool = true;
                        m_ContainerBossList.localPosition = CopyOfThePosition2.localPosition;
                        m_BossBriefInfos.Unfold(false);
                    }
                }
                if (Event_Duplicates != null && (inDungeon || isNeutralMap))
                {
                    Event_Duplicates(true, CopyOfThePanelSpeed);
                }
                if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) < 2)
                {
                    CopyOfThePositionBool = true;
                    m_ContainerBossList.localPosition = CopyOfThePosition2.localPosition;
                }
                m_FunctionForecastTip.gameObject.SetActive(true);
                    SetTipPanelOrBossList(true, false);
                }
            }
            mapId = PlayerDatas.Instance.baseData.MapID;
            m_HighSettingTip.AfterOpen();
@@ -411,36 +250,47 @@
            m_TeamInvitationEntrance.UnInit();
            m_FairyCallBehaviour.UnInit();
            m_FairyLeagueRemind.UnInit();
            m_CollectBehaviour.Dispose();
            horseRidBool = false;
            purchaseModel.UpdateNewMysticalEvent -= UpdateMysticalPurchaseImag;
            assistModel.UpdateRedpointEvent -= UpdateDungeonAssistImag;
            m_MainButtonMisc.Unit();
            PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting;
            FunctionUnlockFlyObject.functionUnLockShowBeginEvent -= UnFlodFunctionArea;
            fairyModel.UpdateFairyRequestEvent -= UpdateFairyRequest;
            GA_Hero.OnEnterOrExitArea -= OnEnterOrExitArea;
            NewBieCenter.Instance.guideBeginEvent -= OnGuideBegin;
            NewBieCenter.Instance.guideCompletedEvent -= OnGuideCompleted;
            PlayerRedPacketDatas.OnRedBagGetEvent -= OnRedBagGet;
            WindowCenter.Instance.windowAfterOpenEvent -= WindowAfterEvent;
            WindowCenter.Instance.windowAfterCloseEvent -= WindowAfterEvent;
            OSEnvelopeModel.OSRedEnvelopeUpdateEvent -= OnRedBagGet;
            OSEnvelopeModel.OSRedEnvelopeInfoEnvent -= OnRedBagGet;
            PlayerTaskDatas.CompletionOfTaskEvent -= CompletionOfTaskEvent;
            RedpointCenter.Instance.redpointValueChangeEvent -= RedpointValueChangeEvent;
            NewBieCenter.Instance.guideBeginEvent -= GuideBeginEvent;
            fairyGrabBossModel.gotoBossStateUpdate -= ShowFairyGrabBoss;
            ChatTip.OnChatUpEvent -= RefreshAdaptiveChat;
            GlobalTimeEvent.Instance.secondEvent -= secondEvent;
            if (WindowCenter.Instance.IsOpen<FunctionForecastWin>())
            {
                WindowCenter.Instance.Close<FunctionForecastWin>();
            }
            GA_NpcCollect.OnArrive -= OnArriveCollectNPC;
            GA_NpcCollect.OnLeave -= OnLeaveCollectNpc;
            fairyGrabBossModel.bossGrabHintEvent -= bossGrabHintEvent;
            wishModel.UpdateWishAwardEvent -= UpdateWishAwardImag;
            m_CollectBehaviour.gameObject.SetActive(false);
        }
        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>();
            }
        }
        protected override void OnAfterClose()
        {
        }
        #endregion
        private void CompletionOfTaskEvent(int obj)
        {
            EffectMgr.Instance.PlayUIEffect(1100, 1100, m_EffectTask, false);
        }
        private void secondEvent()
@@ -455,56 +305,18 @@
        private void GuideBeginEvent()
        {
            if (NewBieCenter.Instance.inGuiding
            var judge = NewBieCenter.Instance.inGuiding
                && (NewBieCenter.Instance.currentGuide == 89
                || NewBieCenter.Instance.currentGuide == TrialDungeonModel.TRIALEXCHANGE_GUIDE))
                || NewBieCenter.Instance.currentGuide == TrialDungeonModel.TRIALEXCHANGE_GUIDE);
            if (judge)
            {
                UnFlodFunctionArea(true, 0);
            }
        }
        private void RedpointValueChangeEvent(int _id)
        {
            if (_id == OSEnvelopeModel.m_RedAchieveRedpoint.id
                || _id == festivalRedpackModel.taskRedpoint.id)
            {
                CheckSendRedpackBtn();
            }
        }
        private void OnRedBagGet()//判断是否开启红包入口
        {
            if (m_RedpackGetSfx.IsPlaying)
            {
                m_RedpackGetSfx.StopImediatly();
            }
            var requireRedpack = (OSEnvelopeModel.CanGetEnvelope()
                || redPacket.IsRedBagGetBool || festivalRedpackModel.ExistRewardableRedpack())
                && !CrossServerUtility.IsCrossServer();
            if (requireRedpack)
            {
                m_RedBag.gameObject.SetActive(true);
                if (!m_RedpackGetSfx.IsPlaying)
                {
                    m_RedpackGetSfx.Play();
                }
            }
            else
            {
                m_RedBag.gameObject.SetActive(false);
            }
            CheckSendRedpackBtn();
        }
        private void CheckSendRedpackBtn()
        {
            m_SendRedbagBtn.gameObject.SetActive(!m_RedBag.gameObject.activeSelf && OSEnvelopeModel.m_RedAchieveRedpoint.state == RedPointState.Simple
                && festivalRedpackModel.taskRedpoint.state == RedPointState.Simple);
        }
        private void OnGuideBegin()//引导开始
        {
            if (Vector3.Distance(m_TaskAndTeamPanel.localPosition, TaskListTipAnchor1.localPosition) > 5)
            if (!m_MainPositionTween.IsTaskAndPanelShow)
            {
                TaskSwithButton();
            }
@@ -542,12 +354,12 @@
            if (_areaType == MapArea.E_Type.Boss && _enter)
            {
                if (Vector3.Distance(m_TaskAndTeamPanel.localPosition, TaskListTipAnchor1.localPosition) < 2 && ListBossMapId.Contains(PlayerDatas.Instance.baseData.MapID))
                if (m_MainPositionTween.IsTaskAndPanelShow && ListBossMapId.Contains(PlayerDatas.Instance.baseData.MapID))
                {
                    TaskSwithButton();
                    onMainModel.IsBossAreaTask = true;
                }
                if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) < 5)
                if (m_MainPositionTween.IsSetCopyOfThePanelShow)
                {
                    if (NewBieCenter.Instance.inGuiding)
                    {
@@ -570,16 +382,9 @@
            if (_areaType == MapArea.E_Type.Boss && !_enter)
            {
                if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2 && !inDungeon && !isNeutralMap)
                if (!m_MainPositionTween.IsSetCopyOfThePanelShow && !inDungeon && !isNeutralMap)
                {
                    CopyOfThePanel.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
                    onMainModel.MainTopPanelShow = true;
                    if (IsCopyOfThePanel != null)
                    {
                        IsCopyOfThePanel(true);
                    }
                    m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
                    m_BossBriefInfos.Unfold(false);
                    SetTipPanelOrBossList(true, true);
                }
            }
        }
@@ -597,7 +402,6 @@
                DTCA202_tagMCAttackMode.Send_SwitchAttackMode((E_AttackMode)0);
                onMainModel.AreaState = Buffmodel.PkType;
                return;
            }
            if (PlayerDatas.Instance.baseData.MapID == 10040 && IsBossBool && Line != PlayerDatas.Instance.baseData.FBID)//逍遥城普通Boss区域处理
            {
@@ -606,11 +410,7 @@
                onMainModel.AreaState = Buffmodel.PkType;
                return;
            }
            if (onMainModel.ShieldedArea.Contains(PlayerDatas.Instance.baseData.MapID))//前四只Boss和活动Boss特殊处理
            {
            }
            else
            if (!onMainModel.ShieldedArea.Contains(PlayerDatas.Instance.baseData.MapID))//前四只Boss和活动Boss特殊处理
            {
                if (IsBossBool && atkInt.Length > 1 && Buffmodel.PkType != 5)
                {
@@ -618,7 +418,6 @@
                    DTCA202_tagMCAttackMode.Send_SwitchAttackMode((E_AttackMode)5);
                }
            }
        }
        private void SetAtkType()//逍遥城非boss区域特殊处理
@@ -633,176 +432,7 @@
                }
            }
        }
        private void OnMaininterCDTime()
        {
            MarkRayButton();
        }
        protected override void OnAfterClose()
        {
        }
        private Vector2 startPosition;
        private Vector2 endPosition;
        private bool horseRidBool = false;
        protected override void LateUpdate()
        {
            base.LateUpdate();
            if (PlayerDatas.Instance.hero != null
             && PlayerDatas.Instance.hero.State == E_ActorState.AutoRun
             && onMainModel.MoveBool)
            {
                if (!WindowCenter.Instance.IsOpen("PathfindingIconWin"))
                {
                    WindowCenter.Instance.Open<PathfindingIconWin>(true);
                }
            }
            else
            {
                onMainModel.MoveBool = false;
                if (WindowCenter.Instance.IsOpen("PathfindingIconWin"))
                {
                    WindowCenter.Instance.Close<PathfindingIconWin>();
                }
            }
        }
        public void FriendQuestBtn()
        {
            if(CrossServerUtility.IsCrossServerOneVsOne())
            {
                friendQuestBtn.gameObject.SetActive(false);
                return;
            }
            if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Friend))
            {
                friendQuestBtn.onClick.RemoveAllListeners();
                if (friendsModel.GetFriendQuestDict().Count > 0)
                {
                    friendQuestBtn.gameObject.SetActive(true);
                    friendQuestBtn.onClick.AddListener(OnClickFriendQuest);
                }
                else
                {
                    friendQuestBtn.gameObject.SetActive(false);
                }
            }
            else
            {
                friendQuestBtn.gameObject.SetActive(false);
            }
        }
        private void OnFairyRequestClick()
        {
            WindowCenter.Instance.Open<FairyInviteWin>();
        }
        private void RedPacketButton()//关于红包的功能 入口
        {
            RedEnvelopeModel envelopeModel = ModelCenter.Instance.GetModel<RedEnvelopeModel>();
            RedEnvelopeModel.RedEnvelope _envelope;
            if (envelopeModel.TryGetLatestEnvelope(out _envelope))
            {
                if (festivalRedpackModel.systemRedpoint.state == RedPointState.GetReward)
                {
                    WindowCenter.Instance.Close<MainInterfaceWin>();
                    festivalRedpackModel.jumpType = 1;
                    festivalRedpackModel.autoOpen = true;
                    WindowCenter.Instance.Open<OpenServerActivityWin>(false, 19);
                }
                else if (festivalRedpackModel.receiveRedpoint.state == RedPointState.GetReward)
                {
                    WindowCenter.Instance.Close<MainInterfaceWin>();
                    festivalRedpackModel.jumpType = 3;
                    festivalRedpackModel.autoOpen = true;
                    WindowCenter.Instance.Open<OpenServerActivityWin>(false, 19);
                }
                else if (OSEnvelopeModel.m_OpenServerGetRedpin.state == RedPointState.GetReward)
                {
                    WindowCenter.Instance.Close<MainInterfaceWin>();
                    ModelCenter.Instance.GetModel<OSRedEnvelopeModel>().JumpType = 2;
                    ModelCenter.Instance.GetModel<OSRedEnvelopeModel>().autoOpen = true;
                    WindowCenter.Instance.Open<OpenServerActivityWin>(false, 2);
                }
                else
                {
                    WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.RedPacket);
                }
            }
        }
        private void SendRedpacketBtn()
        {
            if (festivalRedpackModel.taskRedpoint.state == RedPointState.Simple)
            {
                WindowCenter.Instance.Close<MainInterfaceWin>();
                festivalRedpackModel.jumpType = 2;
                WindowCenter.Instance.Open<OpenServerActivityWin>(false, 19);
            }
            else if (OSEnvelopeModel.m_RedAchieveRedpoint.state == RedPointState.Simple)
            {
                WindowCenter.Instance.Close<MainInterfaceWin>();
                ModelCenter.Instance.GetModel<OSRedEnvelopeModel>().JumpType = 1;
                WindowCenter.Instance.Open<OpenServerActivityWin>(false, 2);
            }
        }
        private void ClickWishAward()
        {
            WindowCenter.Instance.Open<WishingGetItemWin>();
        }
        private void ClickMysticalPurchase()
        {
            WindowCenter.Instance.Open<OpenServerActivityWin>(false, (int)OpenServerActivityCenter.OSActivityType.MysticalPurchase);
        }
        private void ClickDungeonAssist()
        {
            WindowCenter.Instance.Open<DungeonAssistWin>();
        }
        private void UpdateDungeonAssistImag()
        {
            if (CrossServerUtility.IsCrossServerOneVsOne())
            {
                DungeonAssistImg.gameObject.SetActive(false);
                return;
            }
            DungeonAssistImg.gameObject.SetActive(assistModel.IsNewAssistInfo);
        }
        private void UpdateMysticalPurchaseImag()
        {
            if (CrossServerUtility.IsCrossServerOneVsOne())
            {
                MysticalPurchaseImg.gameObject.SetActive(false);
                return;
            }
            MysticalPurchaseImg.gameObject.SetActive(purchaseModel.priorityOpen);
        }
        private void UpdateWishAwardImag()
        {
            if (CrossServerUtility.IsCrossServerOneVsOne())
            {
                WishingAwardImg.gameObject.SetActive(false);
                return;
            }
            WishingAwardImg.gameObject.SetActive(wishModel.wishingAwardDict.Count > 0 ? true : false);
        }
        private void UpdateFairyRequest()
        {
            fairyRequestBtn.gameObject.SetActive(fairyModel.FairyRequestRedPoint.count > 0);
        }
        private void OnClickFriendQuest()
        {
            WindowCenter.Instance.Open<FriendQuestWin>();
        }
        public void MarkRayButton()
        {
            if (NewBieCenter.Instance.inGuiding)
@@ -823,44 +453,27 @@
            {
                if (inDungeon || IsBossBool || isNeutralMap)
                {
                    if (IsCopyOfThePanel != null)
                    {
                        IsCopyOfThePanel(false);
                    }
                    if (Event_Duplicates != null && inDungeon)
                    {
                        Event_Duplicates(false, CopyOfThePanelSpeed);
                    }
                    onMainModel.MainTopPanelShow = false;
                    CopyOfThePanel.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
                    m_ContainerBossList.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
                    m_BossBriefInfos.Unfold(false);
                    SetTipPanelOrBossList(false, true);
                }
                if (!IsBossBool)
                {
                    if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2 && !inDungeon)
                    if (!m_MainPositionTween.IsSetCopyOfThePanelShow && !inDungeon)
                    {
                        if (IsCopyOfThePanel != null)
                        {
                            IsCopyOfThePanel(true);
                        }
                        CopyOfThePanel.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
                        m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
                        m_BossBriefInfos.Unfold(false);
                        SetTipPanelOrBossList(true, true);
                    }
                }
                m_ImageRotation.DOLocalRotate(Vector3.zero, SwitchSkillTipAndButtonTipSpeed);
                m_CastSkillTip.DOLocalMoveX(m_position1_S.localPosition.x, SwitchSkillTipAndButtonTipSpeed);
                m_CastSkillTip.GetComponent<CanvasGroup>().DOFade(1, DoFade);
                m_MailObj.SetActive(true);
                m_AnimationFadeOut.FadeOut();
                recordPositionBool = true;
                m_MainPositionTween.SetRotation(false);
                m_MainPositionTween.SetSkillTipOrRightTipPosTween(true);
            }
        }
        void DownButton(GameObject go)
        {
            _ExpRate.gameObject.SetActive(true);
        }
        void UpButton(GameObject go)
        {
            _ExpRate.gameObject.SetActive(false);
@@ -868,34 +481,26 @@
        void TaskSwithButton()
        {
            if (onMainModel.IsBossAreaTask)
            {
                onMainModel.IsBossAreaTask = false;
            }
            var inDungeon = IsDungeon();
            if (TaskSwithBool)//隐藏
            {
                m_TaskAndTeamPanel.DOLocalMoveX(TaskListTipAnchor2.localPosition.x, Speed);
                if (m_FunctionForecastTip.gameObject.activeSelf)
                m_MainPositionTween.SetTaskPosTween(false);
                if (!inDungeon)
                {
                    FunctionForecastPanel.DOLocalMoveX(unctionForecastPosition2.localPosition.x, Speed);
                }
                LeftImage.SetActive(false);
                RightImg.SetActive(true);
                if (WindowCenter.Instance.IsOpen<FunctionForecastWin>())
                {
                    WindowCenter.Instance.Close<FunctionForecastWin>();
                    m_MainPositionTween.SetFunctionForecastPosTween(false);
                }
            }
            else//显示
            {
                m_TaskAndTeamPanel.DOLocalMoveX(TaskListTipAnchor1.localPosition.x, Speed);
                if (m_FunctionForecastTip.gameObject.activeSelf)
                m_MainPositionTween.SetTaskPosTween(true);
                if (!inDungeon)
                {
                    FunctionForecastPanel.DOLocalMoveX(unctionForecastPosition1.localPosition.x, Speed);
                    m_MainPositionTween.SetFunctionForecastPosTween(true);
                }
                LeftImage.SetActive(true);
                RightImg.SetActive(false);
            }
            if (onMainModel.IsBossAreaTask)
            {
                onMainModel.IsBossAreaTask = false;
            }
            TaskSwithBool = !TaskSwithBool;
        }
@@ -905,83 +510,37 @@
            var inDungeon = IsDungeon();
            bool IsBossBool = MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);
            var isNeutralMap = GeneralDefine.neutralBossMaps.Contains(PlayerDatas.Instance.baseData.MapID);
            var judge1 = inDungeon || IsBossBool || isNeutralMap;
            var judge2 = !IsBossBool && !m_MainPositionTween.IsSetCopyOfThePanelShow && !inDungeon;
            if (recordPositionBool)//显示功能入口
            {
                if (inDungeon || IsBossBool || isNeutralMap)
                if (judge1)
                {
                    CopyOfThePanel.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
                    onMainModel.MainTopPanelShow = true;
                    if (IsCopyOfThePanel != null)
                    {
                        IsCopyOfThePanel(true);
                    }
                    m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
                    m_BossBriefInfos.Unfold(false);
                    if (Event_Duplicates != null && inDungeon)
                    {
                        Event_Duplicates(true, CopyOfThePanelSpeed);
                    }
                    SetTipPanelOrBossList(true, true);
                }
                if (!IsBossBool)
                if (judge2)
                {
                    if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2 && !inDungeon)
                    {
                        CopyOfThePanel.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
                        onMainModel.MainTopPanelShow = true;
                        if (IsCopyOfThePanel != null)
                        {
                            IsCopyOfThePanel(true);
                        }
                        m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
                        m_BossBriefInfos.Unfold(false);
                    }
                    SetTipPanelOrBossList(true, true);
                }
                m_ImageRotation.DOLocalRotate(Vec3, SwitchSkillTipAndButtonTipSpeed);
                m_CastSkillTip.DOLocalMoveX(m_position2_S.localPosition.x, SwitchSkillTipAndButtonTipSpeed);
                m_CastSkillTip.GetComponent<CanvasGroup>().DOFade(0, DoFade);
                m_MailObj.SetActive(false);
                m_AnimationFadeOut.FadeIn();
                _MarkRay.gameObject.SetActive(true);
                m_MainPositionTween.SetSkillTipOrRightTipPosTween(false);
                m_MainPositionTween.SetRotation(true);
            }
            else//显示默认
            {
                if (inDungeon || IsBossBool || isNeutralMap)
                if (judge1)
                {
                    CopyOfThePanel.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
                    onMainModel.MainTopPanelShow = false;
                    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);
                    }
                    SetTipPanelOrBossList(false, true);
                }
                if (!IsBossBool)
                if (judge2)
                {
                    if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2 && !inDungeon)
                    {
                        CopyOfThePanel.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
                        if (IsCopyOfThePanel != null)
                        {
                            IsCopyOfThePanel(true);
                        }
                        m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
                        m_BossBriefInfos.Unfold(false);
                    }
                    SetTipPanelOrBossList(true, true);
                }
                m_ImageRotation.DOLocalRotate(Vector3.zero, SwitchSkillTipAndButtonTipSpeed);
                m_CastSkillTip.DOLocalMoveX(m_position1_S.localPosition.x, SwitchSkillTipAndButtonTipSpeed);
                m_CastSkillTip.GetComponent<CanvasGroup>().DOFade(1, DoFade);
                m_MailObj.SetActive(true);
                m_AnimationFadeOut.FadeOut();
                _MarkRay.gameObject.SetActive(false);
                m_MainPositionTween.SetSkillTipOrRightTipPosTween(true);
                m_MainPositionTween.SetRotation(false);
            }
            recordPositionBool = !recordPositionBool;
        }
@@ -993,7 +552,7 @@
            {
                onMainModel.IsBossAreaTask = false;
            }
            m_TaskAndTeamPanel.localPosition = TaskListTipAnchor1.localPosition;
            m_MainPositionTween.SetTaskPos(true);
            TaskSwithBool = !TaskSwithBool;
        }
@@ -1021,7 +580,7 @@
                    }
                    else
                    {
                        _ExpSlider.delay = _Delaytime;
                        _ExpSlider.delay = 0.1f;
                    }
                    ExpValueFloat = ((float)nowVlaue / (float)maxValue);
                    int MapID = PlayerDatas.Instance.baseData.MapID;
@@ -1063,20 +622,7 @@
                IsCrossServerOneVsOne();
            }
        }
        void OnArriveCollectNPC(uint sid, int npcID)
        {
            m_CollectBehaviour.gameObject.SetActive(true);
            m_CollectBehaviour.Display(npcID, sid);
        }
        void OnLeaveCollectNpc(uint sid, int npcID)
        {
            m_CollectBehaviour.Dispose();
            m_CollectBehaviour.gameObject.SetActive(false);
        }
        #endregion
        private bool IsDungeon()
        {
@@ -1089,39 +635,32 @@
        {
            if (_unflod)
            {
                if (Vector3.Distance(m_CastSkillTip.localPosition, m_position1_S.localPosition) <= 1)//技能面板展开状态
                if (m_MainPositionTween.IsRightTipPanelShow)//技能面板展开状态
                {
                    ShowBtnGroup();//显示按钮组隐藏技能组(强制切换)
                }
                if (Vector3.Distance(m_TaskAndTeamPanel.localPosition, TaskListTipAnchor1.localPosition) > 5)//任务面板
                if (!m_MainPositionTween.IsTaskAndPanelShow)//任务面板
                {
                    TaskSwithButton();
                    onMainModel.IsBossAreaTask = false;
                }
                if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2)//上层面板
                if (!m_MainPositionTween.IsSetCopyOfThePanelShow)//上层面板
                {
                    CopyOfThePanel.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
                    onMainModel.MainTopPanelShow = true;
                    m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
                    m_BossBriefInfos.Unfold(false);
                    if (IsCopyOfThePanel != null)
                    {
                        IsCopyOfThePanel(true);
                    }
                    SetTipPanelOrBossList(true, true);
                }
                m_HighSettingTip.ShowButtonNow();
            }
            else
            {
                if (Vector3.Distance(m_CastSkillTip.localPosition, m_position2_S.localPosition) <= 1)//技能面板收起状态
                if (m_MainPositionTween.IsRightTipPanelShow)//技能面板收起状态
                {
                    ShowCastSkill();//显示技能组,隐藏按钮组(强制切换)
                }
                m_HighSettingTip.ShowButtonNow();
                }
                if (_skillGroup != 0)
                {
                    m_SkillContainer.skillTurnplate.SwitchGroup(_skillGroup);
                }
                m_HighSettingTip.ShowButtonNow();
            }
        }
@@ -1129,7 +668,7 @@
        {
            if (AchievementGoto.achievementType == AchievementGoto.ExcuteSkill)
            {
                if (Vector3.Distance(m_CastSkillTip.localPosition, m_position2_S.localPosition) <= 1)//技能面板收起状态
                if (m_MainPositionTween.IsRightTipPanelShow)//技能面板收起状态
                {
                    ShowCastSkill();//显示技能组隐藏按钮组(强制切换)
                }
@@ -1179,7 +718,7 @@
        public void IsShowButtonGroup()
        {
            if (Vector3.Distance(m_CastSkillTip.localPosition, m_position1_S.localPosition) <= 1)//技能面板展示
            if (m_MainPositionTween.IsRightTipPanelShow)//技能面板展示
            {
                ShowBtnGroup();//显示按钮组隐藏技能组(强制切换)
            }
@@ -1187,20 +726,18 @@
        private void ShowBtnGroup()//显示按钮组,隐藏技能组(强制切换)
        {
            m_AnimationFadeOut.ImmediatelyAppear();//按钮组立即出现
            m_CastSkillTip.localPosition = m_position2_S.localPosition;//技能面板切出
            m_MainPositionTween.SetSkillTipOrRightTipPos(false);
            m_MailObj.SetActive(false);
            m_ImageRotation.DOLocalRotate(Vec3, SwitchSkillTipAndButtonTipSpeed);
            m_MainPositionTween.SetRotation(true);
            recordPositionBool = false;
            _MarkRay.gameObject.SetActive(true);
        }
        private void ShowCastSkill()//显示技能组,隐藏按钮组(强制切换)
        {
            m_AnimationFadeOut.FadeAtOnce();//功能面板立刻隐藏
            m_CastSkillTip.localPosition = m_position1_S.localPosition;//技能面板立即出现
            m_MainPositionTween.SetSkillTipOrRightTipPos(true);
            m_MailObj.SetActive(true);
            m_CastSkillTip.GetComponent<CanvasGroup>().DOFade(1, 0);
            m_ImageRotation.DOLocalRotate(Vector3.zero, SwitchSkillTipAndButtonTipSpeed);
            m_MainPositionTween.SetRotation(false);
            recordPositionBool = true;
            _MarkRay.gameObject.SetActive(false);
        }
@@ -1208,9 +745,10 @@
        private void IsShowTaskPanel()//是否显示任务面板
        {
            var inDungeon = IsDungeon();
            if (inDungeon || fairyGrabBossModel.grabBossHintOpen
                || CrossServerUtility.IsCrossServer()
                || ClientCrossServerOneVsOne.isClientCrossServerOneVsOne)
            var judge = inDungeon || fairyGrabBossModel.grabBossHintOpen
                || CrossServerUtility.IsCrossServer()
                || ClientCrossServerOneVsOne.isClientCrossServerOneVsOne;
            if (judge)
            {
                m_TaskAndTeamTip.SetActive(false);
                m_TaskSwithButton.gameObject.SetActive(false);
@@ -1221,123 +759,16 @@
                m_TaskSwithButton.gameObject.SetActive(true);
            }
        }
        private void bossGrabHintEvent()
        {
            IsShowTaskPanel();
            ShowFairyGrabBoss();
            AtkTypeChange();
        }
        private void ShowFairyGrabBoss()
        {
            m_ContainerGotoGrabBoss.gameObject.SetActive(fairyGrabBossModel.cacheGotoBossId != 0 &&
                !fairyGrabBossModel.grabBossHintOpen);
        }
        private void GotoFairyGrabBoss()
        {
            if (fairyGrabBossModel.cacheGotoBossId != 0)
            {
                var error = 0;
                if (fairyGrabBossModel.TestEnterDungeon(fairyGrabBossModel.cacheGotoBossId, out error))
                {
                    if (fairyGrabBossModel.IsBossKilled(fairyGrabBossModel.cacheGotoBossId))
                    {
                        SysNotifyMgr.Instance.ShowTip("FairyGrabBossOver");
                    }
                    MapTransferUtility.Instance.MoveToNPC(fairyGrabBossModel.cacheGotoBossId);
                }
                else
                {
                    fairyGrabBossModel.DisplayErrorTip(error);
                }
            }
        }
        private void FlyToFairyGrabBoss()
        {
            if (fairyGrabBossModel.cacheGotoBossId != 0)
            {
                var error = 0;
                if (fairyGrabBossModel.TestEnterDungeon(fairyGrabBossModel.cacheGotoBossId, out error))
                {
                    var bossInfoConfig = BossInfoConfig.Get(fairyGrabBossModel.cacheGotoBossId);
                    var flyItemCount = ModelCenter.Instance.GetModel<PlayerPackModel>().GetItemCountByID(PackType.rptItem, GeneralDefine.flyBootItemId);
                    var freeFly = ModelCenter.Instance.GetModel<VipModel>().GetVipPrivilegeCnt(VipPrivilegeType.FreeTransfer) > 0;
                    if (bossInfoConfig != null)
                    {
                        if (freeFly || flyItemCount > 0)
                        {
                            MapTransferUtility.Instance.MissionFlyTo(bossInfoConfig.MapID, fairyGrabBossModel.cacheGotoBossId);
                        }
                        else
                        {
                            if (fairyGrabBossModel.flyToGrabBossRemind)
                            {
                                var money = (int)UIHelper.GetMoneyCnt(1) + (int)UIHelper.GetMoneyCnt(2);
                                if (money >= 1)
                                {
                                    FlyShoesUseCallback();
                                }
                                else
                                {
                                    WindowCenter.Instance.Open<RechargeTipWin>();
                                }
                            }
                            else
                            {
                                FlyShoseConfirmwin.useEnvironment = FlyShoseConfirmwin.UseEnvironment.FairyGrabBoss;
                                FlyShoseConfirmwin.confirmCallBack = FlyShoesUseCallback;
                                WindowCenter.Instance.Open<FlyShoseConfirmwin>();
                            }
                        }
                    }
                }
                else
                {
                    fairyGrabBossModel.DisplayErrorTip(error);
                }
            }
        }
        private void FlyShoesUseCallback()
        {
            switch (FlyShoseConfirmwin.useEnvironment)
            {
                case FlyShoseConfirmwin.UseEnvironment.FairyGrabBoss:
                    if (fairyGrabBossModel.cacheGotoBossId != 0)
                    {
                        var error = 0;
                        if (fairyGrabBossModel.TestEnterDungeon(fairyGrabBossModel.cacheGotoBossId, out error))
                        {
                            var bossInfoConfig = BossInfoConfig.Get(fairyGrabBossModel.cacheGotoBossId);
                            if (bossInfoConfig != null)
                            {
                                MapTransferUtility.Instance.MissionFlyTo(bossInfoConfig.MapID, fairyGrabBossModel.cacheGotoBossId);
                            }
                        }
                        else
                        {
                            fairyGrabBossModel.DisplayErrorTip(error);
                        }
                    }
                    break;
            }
        }
        private void RefreshAdaptiveChat()
        {
            if (ChatTip.Inst == null)
            {
                return;
            }
            m_ContainerAdaptiveChat.sizeDelta = m_ContainerAdaptiveChat.sizeDelta.SetY(
                ChatTip.Inst.IsChatUp ? ChatTip.Inst.chatHighSize.y : ChatTip.Inst.chatLowSize.y);
        }
        private void IsCrossServerOneVsOne()
        {
            if (CrossServerUtility.IsCrossServerOneVsOne() )//是否再跨服副本中
            if (CrossServerUtility.IsCrossServerOneVsOne())//是否再跨服副本中
            {
                WindowCenter.Instance.Open<FightingPKWin>();
                m_HeadPortraitTip.gameObject.SetActive(false);
@@ -1347,9 +778,8 @@
                m_FunctionForecastTip.gameObject.SetActive(false);
                m_TaskSwithButton.gameObject.SetActive(false);
                m_InGamePusher.gameObject.SetActive(false);
                m_RedBag.gameObject.SetActive(false);
                IsShowTaskPanel();
                if (Vector3.Distance(m_CastSkillTip.localPosition, m_position2_S.localPosition) <= 1)//技能面板收起状态
                if (m_MainPositionTween.IsRightTipPanelShow)//技能面板收起状态
                {
                    ShowCastSkill();//显示技能组,隐藏按钮组(强制切换)
                }
@@ -1368,14 +798,53 @@
                {
                    WindowCenter.Instance.Close<FightingPKWin>();
                }
                OnRedBagGet();
            }
        }
        private void SetTipPanelOrBossList(bool _bool, bool _isTween)//顶层按钮组和boss列表的相互切换
        {
            var inDungeon = IsDungeon();
            m_BossBriefInfos.Unfold(false);
            if (_bool)
            {
                if (IsCopyOfThePanel != null)
                {
                    IsCopyOfThePanel(true);
                }
                if (Event_Duplicates != null && inDungeon)
                {
                    Event_Duplicates(true, m_MainPositionTween.CopyOfThePanelSpeed);
                }
                onMainModel.MainTopPanelShow = true;
                if (_isTween)
                {
                    m_MainPositionTween.SetTipAndBossTweenPos(true);
                }
                else
                {
                    m_MainPositionTween.SetTipAndBossPos(true);
                }
            }
            else
            {
                if (IsCopyOfThePanel != null)
                {
                    IsCopyOfThePanel(false);
                }
                if (Event_Duplicates != null && inDungeon)
                {
                    Event_Duplicates(false, m_MainPositionTween.CopyOfThePanelSpeed);
                }
                onMainModel.MainTopPanelShow = false;
                if (_isTween)
                {
                    m_MainPositionTween.SetTipAndBossTweenPos(false);
                }
                else
                {
                    m_MainPositionTween.SetTipAndBossPos(false);
                }
            }
        }
    }
}
}
System/MainInterfacePanel/MainPositionTween.cs
New file
@@ -0,0 +1,226 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Tuesday, February 19, 2019
//--------------------------------------------------------
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using DG.Tweening;
namespace Snxxz.UI
{
    public class MainPositionTween : MonoBehaviour
    {
        [Header("主界面顶部上下切换模块")]
        public float CopyOfThePanelSpeed = 1f;//副本面板移动速度
        [SerializeField] Transform m_CopyOfThePanel;
        [SerializeField] Transform m_CopyOfThePosition1;
        [SerializeField] Transform m_CopyOfThePosition2;
        [SerializeField] Transform m_ContainerBossList;
        [Header("主界面技能面板切换模块")]
        public float SwitchSkillTipAndButtonTipSpeed = 1.2f;//技能面板和按钮面板的移动速度
        [SerializeField] Transform m_CastSkillTip;//技能面板
        [SerializeField] Transform m_position1_S;
        [SerializeField] Transform m_position2_S;
        [SerializeField] AnimationFadeOut m_AnimationFadeOut;//右下角按钮组
        [Header("主界面任务模块")]
        public float TaskSpeed = 0.2f;//任务面板移动的速度
        [SerializeField] Transform m_TaskAndTeamPanel;
        [SerializeField] Transform m_TaskListTipAnchor1;
        [SerializeField] Transform m_TaskListTipAnchor2;
        [SerializeField] GameObject m_LeftImage;
        [SerializeField] GameObject m_RightImg;
        [Header("功能预告模块")]
        [SerializeField] Transform m_FunctionForecastPanel;
        [SerializeField] Transform m_unctionForecastPosition1;
        [SerializeField] Transform m_unctionForecastPosition2;
        [Header("切换按钮旋转")]
        public Vector3 Vec3 = new Vector3(0f, 0f, 225f);//切换旋转的角度
        [SerializeField] Transform m_ImageRotation;//切换滚动
        public bool IsSetCopyOfThePanelShow
        {
            get
            {
                return (m_CopyOfThePanel.position - m_CopyOfThePosition1.position).sqrMagnitude < (2.5 * 2.5);
            }
        }
        public void SetCopyOfThePanelPos(bool _bool)
        {
            if (_bool)
            {
                m_CopyOfThePanel.localPosition = m_CopyOfThePosition1.localPosition;
            }
            else
            {
                m_CopyOfThePanel.localPosition = m_CopyOfThePosition2.localPosition;
            }
        }
        public void SetCopyOfThePanelTweenPos(bool _bool)
        {
            if (_bool)
            {
                m_CopyOfThePanel.DOLocalMoveY(m_CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
            }
            else
            {
                m_CopyOfThePanel.DOLocalMoveY(m_CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
            }
        }
        public void SetBossListPos(bool _bool)
        {
            if (_bool)
            {
                m_ContainerBossList.localPosition = m_CopyOfThePosition1.localPosition;
            }
            else
            {
                m_ContainerBossList.localPosition = m_CopyOfThePosition2.localPosition;
            }
        }
        public void SetBossListTweenPos(bool _bool)
        {
            if (_bool)
            {
                m_ContainerBossList.DOLocalMoveY(m_CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
            }
            else
            {
                m_ContainerBossList.DOLocalMoveY(m_CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
            }
        }
        public void SetTipAndBossPos(bool _bool)
        {
            if (_bool)
            {
                SetCopyOfThePanelPos(true);
                SetBossListPos(false);
            }
            else
            {
                SetCopyOfThePanelPos(false);
                SetBossListPos(true);
            }
        }
        public void SetTipAndBossTweenPos(bool _bool)
        {
            if (_bool)
            {
                SetCopyOfThePanelTweenPos(true);
                SetBossListTweenPos(false);
            }
            else
            {
                SetCopyOfThePanelTweenPos(false);
                SetBossListTweenPos(true);
            }
        }
        //-----------------------------
        public bool IsRightTipPanelShow
        {
            get
            {
                return (m_CastSkillTip.position - m_position1_S.position).sqrMagnitude < 1;
            }
        }
        public void SetSkillTipOrRightTipPos(bool _bool)
        {
            if (_bool)
            {
                m_AnimationFadeOut.FadeAtOnce();
                m_CastSkillTip.localPosition = m_position1_S.localPosition;
            }
            else
            {
                m_AnimationFadeOut.ImmediatelyAppear();
                m_CastSkillTip.localPosition = m_position2_S.localPosition;
            }
        }
        public void SetSkillTipOrRightTipPosTween(bool _bool)
        {
            if (_bool)
            {
                m_AnimationFadeOut.FadeOut();
                m_CastSkillTip.DOLocalMoveX(m_position1_S.localPosition.x, SwitchSkillTipAndButtonTipSpeed);
            }
            else
            {
                m_AnimationFadeOut.FadeIn();
                m_CastSkillTip.DOLocalMoveX(m_position2_S.localPosition.x, SwitchSkillTipAndButtonTipSpeed);
            }
        }
        //----------------------------
        public bool IsTaskAndPanelShow
        {
            get
            {
                return (m_TaskAndTeamPanel.localPosition - m_TaskListTipAnchor1.localPosition).sqrMagnitude < 3*3;
            }
        }
        public void SetTaskPos(bool _bool)
        {
            if (_bool)
            {
                m_TaskAndTeamPanel.localPosition = m_TaskListTipAnchor1.localPosition;
            }
            else
            {
                m_TaskAndTeamPanel.localPosition = m_TaskListTipAnchor2.localPosition;
            }
        }
        public void SetTaskPosTween(bool _bool)
        {
            if (_bool)
            {
                m_TaskAndTeamPanel.DOLocalMoveX(m_TaskListTipAnchor1.localPosition.x, TaskSpeed);
                m_LeftImage.SetActive(true);
                m_RightImg.SetActive(false);
            }
            else
            {
                m_TaskAndTeamPanel.DOLocalMoveX(m_TaskListTipAnchor2.localPosition.x, TaskSpeed);
                m_LeftImage.SetActive(false);
                m_RightImg.SetActive(true);
            }
        }
        //-----------------------------
        public void SetFunctionForecastPos(bool _bool)
        {
            if (_bool)
            {
                m_FunctionForecastPanel.localPosition = m_unctionForecastPosition1.localPosition;
            }
            else
            {
                m_FunctionForecastPanel.localPosition = m_unctionForecastPosition2.localPosition;
            }
        }
        public void SetFunctionForecastPosTween(bool _bool)
        {
            if (_bool)
            {
                m_FunctionForecastPanel.DOLocalMoveX(m_unctionForecastPosition1.localPosition.x, TaskSpeed);
            }
            else
            {
                m_FunctionForecastPanel.DOLocalMoveX(m_unctionForecastPosition2.localPosition.x, TaskSpeed);
            }
        }
        //--------------------------------
        public void SetRotation(bool _bool)
        {
            if (_bool)
            {
                m_ImageRotation.DOLocalRotate(Vec3, SwitchSkillTipAndButtonTipSpeed);
            }
            else
            {
                m_ImageRotation.DOLocalRotate(Vector3.zero, SwitchSkillTipAndButtonTipSpeed);
            }
        }
    }
}
System/MainInterfacePanel/MainPositionTween.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 45251c5495a7a4c468cba14b1e378c66
timeCreated: 1550543106
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/WindowBase/WindowCenter.cs
@@ -597,7 +597,7 @@
            }
            checkTimer += Time.deltaTime;
            if (checkTimer > 2f)
            if (checkTimer > 0.5f)
            {
                checkTimer = 0f;
                if (!StageLoad.Instance.isLoading)
Utility/ConfigInitiator.cs
@@ -384,7 +384,7 @@
                }
                else if (DeviceUtility.cpu > 1 && DeviceUtility.memory > 1.5f * 1024)
                {
                    return 4;
                    return 2;
                }
                else
                {
Utility/LogicEngine.cs
@@ -2,21 +2,8 @@
using System.Collections.Generic;
using UnityEngine;
public class LogicEngine : MonoBehaviour
public class LogicEngine : SingletonMonobehaviour<LogicEngine>
{
    public static LogicEngine Instance { get; private set; }
    [RuntimeInitializeOnLoadMethod]
    static void Init()
    {
        if (FindObjectOfType<LogicEngine>() == null)
        {
            var gameObject = new GameObject("LogicEngine");
            Instance = gameObject.AddMissingComponent<LogicEngine>();
            GameObject.DontDestroyOnLoad(gameObject);
        }
    }
    List<LogicUpdate> logicUpdates = new List<LogicUpdate>();
    public void Register(LogicUpdate logicUpdate)
    {
Utility/RuntimeLogUtility.cs
@@ -9,7 +9,7 @@
{
    private static string LS_Key_ForceAutoFight = "LS_Key_ForceAutoFight";
    public static bool TEST_CLIENT_PVP = false;
    public static bool TEST_CLIENT_PVP_AI = false;
    public static bool TEST_CLIENT_PVP_AI = true;
    public static bool s_BattleLog = false;
    public static bool s_MoveLog = false;
    public static bool s_ForceOneEnemy = false;