From e396c037992fde2910fa2a8b3cd450b8a1e8bccb Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期一, 27 五月 2019 21:16:07 +0800
Subject: [PATCH] 3761 【2.0】仙盟联赛水晶无法采集

---
 Fight/MapTransferUtility.cs |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/Fight/MapTransferUtility.cs b/Fight/MapTransferUtility.cs
index 27741c9..56bfe55 100644
--- a/Fight/MapTransferUtility.cs
+++ b/Fight/MapTransferUtility.cs
@@ -858,7 +858,7 @@
         }
 
         // 閽堝鎸栨礊瀵硅薄淇濇寔璺濈涓�0
-        if (npc != null && _config.Dig == 1)
+        if (_config.Dig == 1)
         {
             _chkDist = 0;
         }
@@ -866,7 +866,7 @@
         // 澶т簬閰嶇疆鐨勮窛绂�, 绉诲姩鑷�
         if (_distSqrt > Mathf.Pow(_chkDist, 2))
         {
-            _hero.MoveToPosition(_destPos, _chkDist - 0.3f, true);
+            _hero.MoveToPosition(_destPos, _chkDist, true);
 
             if (s_OnHeroStartMoveToNPC != null)
             {
@@ -888,6 +888,13 @@
                     if (_collect != null)
                     {
                         PrepareHandler.Instance.Arrive(_collect);
+
+                        if (_distSqrt < Mathf.Pow(_collect.NpcConfig.ModelRadius + 0.4f + GeneralDefine.CloseNpcDist, 2))
+                        {
+                            NPCInteractProcessor.InvokeEvent(E_NpcType.Collect, _collect.NpcConfig.NPCID, _collect.ServerInstID);
+                            var _dir = MathUtility.ForwardXZ(_collect.Pos, _hero.Pos);
+                            _hero.Forward = _dir;
+                        }
                     }
                 }
                 else
@@ -1321,7 +1328,7 @@
                     {
                         if (_npc != null)
                         {
-                            if (_npc is GA_NpcClientFightNorm)
+                            if (_npc is GA_NpcCollect)
                             {
                                 NPCInteractProcessor.InvokeEvent(E_NpcType.Func, NpcID, _npc.ServerInstID);
                             }

--
Gitblit v1.8.0