少年修仙传客户端代码仓库
Client_PangDeRong
2018-12-26 44dc538f4cb5cabd736641fc91e456d98a1d0268
5398 子 【开发】【1.4】跨服竞技场 / 【前端】【1.4】跨服竞技场开发
1个文件已修改
32 ■■■■■ 已修改文件
System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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 历史记录