少年修仙传客户端代码仓库
client_Hale
2019-03-28 29ffff70e64abd535eace075e3822650e1c748d8
382 采集触发逻辑修改
2个文件已修改
23 ■■■■■ 已修改文件
Fight/GameActor/GA_NpcClientCollect.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/MainCollectBehaviour.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_NpcClientCollect.cs
@@ -245,27 +245,17 @@
    public void Arrive()
    {
        if (!m_ArrivedList.Contains(ServerInstID))
        if (OnArrive != null)
        {
            if (OnArrive != null)
            {
                OnArrive(ServerInstID, NpcConfig.NPCID);
            }
            m_ArrivedList.Add(ServerInstID);
            Debug.Log("靠近了采集物: " + NpcConfig.NPCID);
            OnArrive(ServerInstID, NpcConfig.NPCID);
        }
    }
    public void Leave()
    {
        if (m_ArrivedList.Contains(ServerInstID))
        if (OnLeave != null)
        {
            if (OnLeave != null)
            {
                OnLeave(ServerInstID, NpcConfig.NPCID);
            }
            m_ArrivedList.Remove(ServerInstID);
            Debug.Log("离开了采集物: " + NpcConfig.NPCID);
            OnLeave(ServerInstID, NpcConfig.NPCID);
        }
    }
}
System/MainInterfacePanel/MainCollectBehaviour.cs
@@ -31,6 +31,11 @@
        public void Display(int npcId, uint sid)
        {
            if (npcId == collectNpcId && sid == serverInstanceId)
            {
                return;
            }
            collectNpcId = npcId;
            serverInstanceId = sid;