From 6f6e2d89b1c260c1a33679a9fdb6cf9007a2757f Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期二, 28 八月 2018 16:38:50 +0800
Subject: [PATCH] update 前往boss逻辑修改

---
 Fight/MapTransferUtility.cs |   32 ++++++++++++++++++++++++++++++--
 1 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/Fight/MapTransferUtility.cs b/Fight/MapTransferUtility.cs
index 9d9ca65..1bbdd4e 100644
--- a/Fight/MapTransferUtility.cs
+++ b/Fight/MapTransferUtility.cs
@@ -264,8 +264,36 @@
                 //Debug.LogFormat(" |-- 涓嶅湪瑙嗛噹鍐�");
                 var _mapConfig = Config.Instance.Get<MapConfig>(_npcLocation.mapId);
 
+                var _lineID = 0;
+                var _forceTransfer = false;
+
+                // 鍒ゆ柇浠欑洘boss閫昏緫
+                var _fairyBossModel = ModelCenter.Instance.GetModel<FairyGrabBossModel>();
+                if (_fairyBossModel != null)
+                {
+                    // 鏄粰鐩焍oss
+                    if (_fairyBossModel.bosses != null
+                     && _fairyBossModel.bosses.Contains(npcID))
+                    {
+                        // 鍙栧緱鍒嗙嚎
+                        if (GeneralConfig.Instance.fairyGrabBossMapLines != null
+                         && GeneralConfig.Instance.fairyGrabBossMapLines.TryGetValue(_npcLocation.mapId, out _lineID))
+                        {
+                            // 濡傛灉褰撳墠澶勪簬涓嶅悓鐨勫垎绾�, 鍒欎笅闈㈢殑澶勭悊涓�,鍦板浘ID鐩稿悓涔熷垏绾�
+                            if (_lineID != PlayerDatas.Instance.baseData.FBID)
+                            {
+                                _forceTransfer = true;
+                            }
+                        }
+                        else
+                        {
+                            Debug.LogErrorFormat("瀵瑰簲鐨勫湴鍥綢D: {0} 鍦ㄩ厤缃腑娌℃湁瀵瑰簲鐨勫垎绾縤d", _npcLocation.mapId);
+                        }
+                    }
+                }
+
                 // 濡傛灉涓嶆槸澶勪簬鐩稿悓鍦板浘, 鍒欏垏鍥�
-                if (_npcLocation.mapId != PlayerDatas.Instance.baseData.MapID)
+                if (_npcLocation.mapId != PlayerDatas.Instance.baseData.MapID || _forceTransfer)
                 {
                     if (PlayerDatas.Instance.extersion.pkState == 1)
                     {
@@ -282,7 +310,7 @@
                     //Debug.LogFormat(" |-- 涓嶅湪鏈湴鍥�");
                     var mapId = _npcLocation.mapId;
                     var position = new Vector3(_mapConfig.BornPoints[0].x, 0, _mapConfig.BornPoints[0].y);
-                    Send_WorldTransfer(mapId, position, MapTransferType.WorldTransport, 0, npcID);
+                    Send_WorldTransfer(mapId, position, MapTransferType.WorldTransport, (byte)_lineID, npcID);
 
                     if (BossFakeLineUtility.Instance.IsShuntBoss(npcID))
                     {

--
Gitblit v1.8.0