少年修仙传客户端代码仓库
client_Hale
2018-12-27 49c6aef8d723be2220edc53bb7f6bd1775175685
System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs
@@ -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,36 @@
            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;
            }
            return false;
        }
        #endregion
        #region 历史记录