From 9e998f9cbced9c3deedc51b81907fc4cd2b5807f Mon Sep 17 00:00:00 2001 From: Le Duc Anh Date: Fri, 15 May 2026 11:26:43 +0700 Subject: [PATCH] fix mnini map npc process --- Assets/PerfectWorld/Scripts/UI/MiniMap/CDlgMiniMap.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Assets/PerfectWorld/Scripts/UI/MiniMap/CDlgMiniMap.cs b/Assets/PerfectWorld/Scripts/UI/MiniMap/CDlgMiniMap.cs index e280a14d1b..be623b402b 100644 --- a/Assets/PerfectWorld/Scripts/UI/MiniMap/CDlgMiniMap.cs +++ b/Assets/PerfectWorld/Scripts/UI/MiniMap/CDlgMiniMap.cs @@ -148,11 +148,11 @@ namespace PerfectWorld.UI.MiniMap UniTask.RunOnThreadPool(async () => { - await WatchNPCMiniMapData(npcMan, token); + await UpdateNPCMiniMapDataTask(npcMan, token); }, false, cancellationToken: token).Forget(); } - private async UniTask WatchNPCMiniMapData(CECNPCMan npcMan, CancellationToken token) + private async UniTask UpdateNPCMiniMapDataTask(CECNPCMan npcMan, CancellationToken token) { List lastNPCData = new(); @@ -168,7 +168,8 @@ namespace PerfectWorld.UI.MiniMap _pendingNPCMiniMapData = currentNPCData; } - lastNPCData = currentNPCData; + lastNPCData.Clear(); + lastNPCData.AddRange(currentNPCData); _needRenderNPCMiniMap = true; } @@ -207,6 +208,10 @@ namespace PerfectWorld.UI.MiniMap return true; } + /// + /// Render the following objects on the minimap:
+ /// - NPC_ESSENCE
+ ///
private void RenderNPCMiniMap() { List npcData;