少年修仙传客户端代码仓库
client_Zxw
2018-12-27 73ecb4c90051a6ae90c4bfd520d455cd6940a358
System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs
@@ -126,8 +126,8 @@
                    WindowCenter.Instance.Open<CrossServerOneVsOneRoundWin>();
                }
            }
            if(mission.isStart == 1)
            DebugEx.LogFormat("副本帮助信息回合是否开始::{0}",mission.isStart);
            if (mission.isStart == 1)
            {
                if(WindowCenter.Instance.IsOpen<CrossServerOneVsOneRoundWin>())
                {
@@ -324,6 +324,8 @@
        /// <param name="type"></param>
        public void SendCrossMatch(int type)
        {
            if (type == 1 && TryGetMatchTip()) return;
            CC101_tagCMCrossRealmPKMatch match = new CC101_tagCMCrossRealmPKMatch();
            match.Type = (byte)type;
            GameNetSystem.Instance.SendInfo(match);
@@ -334,6 +336,50 @@
            CC102_tagCMCrossRealmPKBuy pKBuy = new CC102_tagCMCrossRealmPKBuy();
            GameNetSystem.Instance.SendInfo(pKBuy);
        }
        public bool TryGetMatchTip()
        {
            int mapId = PlayerDatas.Instance.baseData.MapID;
            int dataMapId = dungeonModel.GetDataMapIdByMapId(mapId);
            bool isCrossDungeon = dataMapId == CrossServerDataMapId;
            if(isCrossDungeon)
            {
                SysNotifyMgr.Instance.ShowTip("CrossMatching3");
                return true;
            }
            var mapConfig = Config.Instance.Get<MapConfig>(mapId);
            bool isDungeon = mapConfig != null && mapConfig.MapFBType != 0 ? true : false;
            if (isDungeon)
            {
                SysNotifyMgr.Instance.ShowTip("CrossMatching4");
                return true;
            }
            var deadModel = ModelCenter.Instance.GetModel<PlayerDeadModel>();
            if(deadModel.playerIsDie)
            {
                SysNotifyMgr.Instance.ShowTip("CrossMatching5");
                return true;
            }
            var teamModel = ModelCenter.Instance.GetModel<TeamModel>();
            bool isTeamMatch = teamModel.isMatching;
            if(isTeamMatch)
            {
                SysNotifyMgr.Instance.ShowTip("CrossMatching6");
                return true;
            }
            bool isDungeonPrepare = teamModel.teamPrepare.isPreparing;
            if(isDungeonPrepare)
            {
                SysNotifyMgr.Instance.ShowTip("CrossMatching7");
                return true;
            }
            return false;
        }
        #endregion
        #region 历史记录