From 7959c89a3469bc513c5f2669e1e4cae07039d2d2 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期四, 25 四月 2019 12:25:16 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 System/WorldMap/LocalMapFindPath.cs |   54 +++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 41 insertions(+), 13 deletions(-)

diff --git a/System/WorldMap/LocalMapFindPath.cs b/System/WorldMap/LocalMapFindPath.cs
index d338ae2..ef1fae6 100644
--- a/System/WorldMap/LocalMapFindPath.cs
+++ b/System/WorldMap/LocalMapFindPath.cs
@@ -69,7 +69,8 @@
             mapMatrix = new LocalMap(mapId, mapWidth, mapHeight, uiMapWidth, uiMapHeight);
 
             DrawWayPoints();
-            DrawFunctionNPCs();
+            DrawFunctionNpcs();
+            DrawJumpPoints();
             DrawEventPoints();
             m_HeroHead.transform.SetAsLastSibling();
             FoucsEventPoint(model.selectedMapEventPoint);
@@ -255,20 +256,12 @@
 
             var behaviour = LocalMapTagPool.Require(npcType);
             tagBehaviours.Add(behaviour);
-            if (npcType == LocalMapTag.TagType.Boss)
-            {
-                behaviour.Display(eventPointConfig.NPCID, (TextColType)eventPointConfig.Colour, npcPos);
-            }
-            else
-            {
-                behaviour.Display(npcConfig.NPCID, (TextColType)eventPointConfig.Colour);
-            }
+            behaviour.Display(npcType == LocalMapTag.TagType.Boss ? eventPointConfig.NPCID : npcConfig.NPCID, (TextColType)eventPointConfig.Colour);
 
             var pathPointPos = mapMatrix.WorldToLocalPosition(npcPos);
             behaviour.transform.SetParentEx(m_LocalMapRect, pathPointPos, Quaternion.identity, Vector3.one);
             behaviour.gameObject.SetActive(true);
         }
-
 
         private void DrawWayPoints()
         {
@@ -295,7 +288,7 @@
             behaviour.gameObject.SetActive(true);
         }
 
-        private void DrawFunctionNPCs()
+        private void DrawFunctionNpcs()
         {
             var npcRefreshIds = model.GetMapNPCRefreshIds(mapId);
             if (npcRefreshIds != null)
@@ -304,12 +297,12 @@
                 {
                     var config = mapnpcConfig.Get(item);
                     var npcConfig = NPCConfig.Get(config.NPCID);
-                    DrawFunctionNPC(item);
+                    DrawFunctionNpc(item);
                 }
             }
         }
 
-        private void DrawFunctionNPC(string _refreshId)
+        private void DrawFunctionNpc(string _refreshId)
         {
             var mapNpcConfig = mapnpcConfig.Get(_refreshId);
 
@@ -325,6 +318,41 @@
             behaviour.Display(mapNpcConfig.NPCID, TextColType.White);
         }
 
+        private void DrawJumpPoints()
+        {
+            var mapData = H2Engine.MapData.LoadFormFile(mapId);
+            if (mapData == null)
+            {
+                return;
+            }
+
+            var transfers = mapData.transfers;
+            var jumpPoints = new List<Vector3>();
+            foreach (var transfer in transfers)
+            {
+                foreach (var transferPoint in transfer.transferPoints)
+                {
+                    jumpPoints.Add(transferPoint.position);
+                }
+            }
+
+            foreach (var jumpPoint in jumpPoints)
+            {
+                DrawJumpPoint(jumpPoint);
+            }
+        }
+
+        private void DrawJumpPoint(Vector3 position)
+        {
+            var behaviour = LocalMapTagPool.Require(LocalMapTag.TagType.JumpPoint);
+            tagBehaviours.Add(behaviour);
+
+            var pathPointPos = mapMatrix.WorldToLocalPosition(position);
+            behaviour.transform.SetParentEx(m_LocalMapRect, pathPointPos, Quaternion.identity, Vector3.one);
+            behaviour.gameObject.SetActive(true);
+            behaviour.Display(position);
+        }
+
         private void UpdateHeroPosition()
         {
             if (mapId == PlayerDatas.Instance.baseData.MapID)

--
Gitblit v1.8.0