From ea4db5554e0c28e42e53dca2fb4842a2969ede80 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期六, 25 五月 2019 18:05:54 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 Fight/Actor/HeroBehaviour.cs     |    2 ++
 Fight/GameActor/PersonalEnemy.cs |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 Fight/ClientDropItemUtility.cs   |    3 ++-
 3 files changed, 51 insertions(+), 1 deletions(-)

diff --git a/Fight/Actor/HeroBehaviour.cs b/Fight/Actor/HeroBehaviour.cs
index 7ad086a..5f23d4c 100644
--- a/Fight/Actor/HeroBehaviour.cs
+++ b/Fight/Actor/HeroBehaviour.cs
@@ -749,6 +749,8 @@
                 {
                     _b405.PosX = (ushort)(GA_Hero.recordServerPos.x + GA_Hero.MapOffset.x);
                     _b405.PosY = (ushort)(GA_Hero.recordServerPos.z + GA_Hero.MapOffset.z);
+                    _b405.TagPosX = (ushort)(GA_Hero.recordServerPos.x + GA_Hero.MapOffset.x);
+                    _b405.TagPosY = (ushort)(GA_Hero.recordServerPos.z + GA_Hero.MapOffset.z);
                 }
 
                 //        Debug.LogFormat("閲婃斁浜嗘妧鑳�: {0},褰撳墠浣嶇疆: {1} 鐩爣浣嶇疆: {2}", _b405.SkillID, new Vector2(_b405.PosX, _b405.PosY), new Vector2(_b405.TagPosX, _b405.TagPosY));
diff --git a/Fight/ClientDropItemUtility.cs b/Fight/ClientDropItemUtility.cs
index d08a978..b67f365 100644
--- a/Fight/ClientDropItemUtility.cs
+++ b/Fight/ClientDropItemUtility.cs
@@ -136,7 +136,8 @@
         }
 
         RecordFakeDrop(itemID, Time.time);
-        DropItem.DropFake(itemID, m_DropPos, CameraController.Instance.CameraObject, _time);
+        var _item = DropItem.DropFake(itemID, m_DropPos, CameraController.Instance.CameraObject, _time);
+        m_DropItemList.Add(_item);
     }
 
     public void Drop(Vector3 center, int[] itemIds)
diff --git a/Fight/GameActor/PersonalEnemy.cs b/Fight/GameActor/PersonalEnemy.cs
index a3c418d..2d23ef9 100644
--- a/Fight/GameActor/PersonalEnemy.cs
+++ b/Fight/GameActor/PersonalEnemy.cs
@@ -84,6 +84,53 @@
         GAMgr.Instance.Release(npc);
     }
 
+    public static void Bind(H0406_tagNPCAppear h0406)
+    {
+        if (!BindInfoDict.ContainsKey(h0406.NPCID))
+        {
+            return;
+        }
+
+        if (BindInfoDict[h0406.NPCID].Count == 0)
+        {
+            BindInfoDict.Remove(h0406.NPCID);
+            return;
+        }
+
+        var _bindInfo = BindInfoDict[h0406.NPCID][0];
+        var _config = NPCConfig.Get((int)h0406.NPCID);
+        GA_NpcClientFightNorm _npc = null;
+        if (_config.IsBoss != (int)E_MonsterType.Normal
+         && _config.IsBoss != (int)E_MonsterType.Elite)
+        {
+            _npc = GAMgr.Instance.ReqClntFightNpc<GA_NpcClientFightBoss>(_bindInfo.npcID, _bindInfo.g);
+        }
+        else
+        {
+            _npc = GAMgr.Instance.ReqClntFightNpc<GA_NpcClientFightNorm>(_bindInfo.npcID, _bindInfo.g);
+        }
+
+        if (_npc != null)
+        {
+            var _vaildPos = _bindInfo.pos;
+            GActor.TryGetValidPos(_bindInfo.pos, ref _vaildPos);
+            _npc.BornPos = _npc.Pos = _vaildPos;
+            m_CBinSdDict[_npc.ServerInstID] = h0406.ObjID;
+            m_SBindCDict[h0406.ObjID] = _npc.ServerInstID;
+            _npc.ActorInfo.Hp = h0406.NPCHP;
+            _npc.ActorInfo.HpEx = h0406.NPCHPEx;
+            _npc.ActorInfo.MaxHp = h0406.MaxHP;
+            _npc.ActorInfo.MaxHpEx = h0406.MaxHPEx;
+            _npc.ActorInfo.moveSpeed = 500f / h0406.Speed;
+            if (OnNpcAppear != null)
+            {
+                OnNpcAppear(_npc);
+            }
+        }
+
+        BindInfoDict[h0406.NPCID].RemoveAt(0);
+    }
+
     public static void Bind(H0408_tagPlayerSummonNPCAppear h0408)
     {
         if (!BindInfoDict.ContainsKey(h0408.NPCID))

--
Gitblit v1.8.0