| Fight/GameActor/GA_NpcCollect.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Fight/PrepareHandler.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/MainInterfacePanel/MainCollectBehaviour.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Fight/GameActor/GA_NpcCollect.cs
@@ -259,14 +259,16 @@ { _hero.MoveToPosition(Pos, 1f); } PrepareHandler.Instance.TriggerOnShowCollect(ServerInstID, NpcConfig.NPCID); } protected override void HandleOnClick() { if (NpcConfig.NPCID != GeneralDefine.GatherSoulDZ) { base.HandleOnClick(); } // if (NpcConfig.NPCID != GeneralDefine.GatherSoulDZ) // { // base.HandleOnClick(); // } } protected override void OnUnit() Fight/PrepareHandler.cs
@@ -41,11 +41,16 @@ public UnityAction<uint, int> OnShowCollectIcon; public UnityAction<uint, int> OnHideCollectIcon; public void TriggerOnShowCollect(uint sid, int npcId) { if (OnShowCollectIcon != null) { OnShowCollectIcon(sid, npcId); } } public void Init() { NPCInteractProcessor.s_NpcInteractEvent -= HandleCallback; NPCInteractProcessor.s_NpcInteractEvent += HandleCallback; WindowCenter.Instance.windowAfterOpenEvent -= CheckOpenCollectIcon; WindowCenter.Instance.windowAfterOpenEvent += CheckOpenCollectIcon; WindowCenter.Instance.windowAfterCloseEvent -= CheckCloseCollectIcon; @@ -89,7 +94,7 @@ } } private void HandleCallback(E_NpcType type, int npcID, uint sid) public void HandleCallback(E_NpcType type, int npcID, uint sid) { var _target = GAMgr.Instance.GetBySID(sid); if (!(_target is GA_NpcCollect)) @@ -143,15 +148,16 @@ _hero.SelectTarget = _npc; } if (OnShowCollectIcon != null) { OnShowCollectIcon(_npc.ServerInstID, _npc.NpcConfig.NPCID); } _checkDis = MathUtility.DistanceSqrtXZ(_hero.Pos, _npc.Pos); if (_checkDis < 4f) { if (OnShowCollectIcon != null) { OnShowCollectIcon(_npc.ServerInstID, _npc.NpcConfig.NPCID); } NPCInteractProcessor.InvokeEvent(E_NpcType.Collect, _npc.NpcConfig.NPCID, _npc.ServerInstID); var _dir = MathUtility.ForwardXZ(_npc.Pos, _hero.Pos); _hero.Forward = _dir; } System/MainInterfacePanel/MainCollectBehaviour.cs
@@ -19,7 +19,8 @@ int collectNpcId = 0; uint serverInstanceId = 0; DungeonModel dungeonModel { DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } } @@ -37,7 +38,6 @@ collectNpcId = npcId; serverInstanceId = sid; var mapId = dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID); m_ContainerNormalCollect.gameObject.SetActive(false); m_GatherSoulBuild.gameObject.SetActive(false); @@ -82,7 +82,8 @@ { if (collectNpcId != 0 && serverInstanceId != 0) { NPCInteractProcessor.InvokeEvent(E_NpcType.Collect, collectNpcId, serverInstanceId); PrepareHandler.Instance.HandleCallback(E_NpcType.Collect, collectNpcId, serverInstanceId); // NPCInteractProcessor.InvokeEvent(E_NpcType.Collect, collectNpcId, serverInstanceId); } } }