From ee3196b5a04c15d025d1a9eab825d5d14987758d Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 30 十月 2025 00:23:30 +0800
Subject: [PATCH] 286 【常规】坊市系统; 调整布阵界面对应引导

---
 Main/System/Redpoint/RedpointCenter.cs |   33 ++++++++++++++++++++++++++++++---
 1 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/Main/System/Redpoint/RedpointCenter.cs b/Main/System/Redpoint/RedpointCenter.cs
index 408a26f..69b7ae9 100644
--- a/Main/System/Redpoint/RedpointCenter.cs
+++ b/Main/System/Redpoint/RedpointCenter.cs
@@ -50,19 +50,46 @@
         }
     }
 
+    //棰濆娣诲姞鐖剁孩鐐圭敤
+    public void AddParent(int _parentId, int _childId)
+    {
+        Redpoint child = null;
+        if (!redpoints.TryGetValue(_childId, out child))
+        {
+            Debug.LogErrorFormat("娣诲姞鐖跺瓙鍏崇郴澶辫触锛屽瓙鑺傜偣涓嶅瓨鍦細id->{0}", _childId);
+            return;
+        }
+
+        child.otherParent = _parentId;
+
+        List<int> children = null;
+        if (!parentChildren.TryGetValue(_parentId, out children))
+        {
+            parentChildren[_parentId] = children = new List<int>();
+        }
+
+        if (!children.Contains(_childId))
+        {
+            children.Add(_childId);
+        }
+    }
+
     public void Report(Redpoint _redpoint)
     {
-        var parentId = _redpoint.parent;
-
         if (redpointValueChangeEvent != null)
         {
             redpointValueChangeEvent(_redpoint.id);
         }
 
-        if (parentId > 0)
+        if (_redpoint.parent > 0)
         {
             TestParentValue(_redpoint.parent);
         }
+        
+        if (_redpoint.otherParent > 0)
+        {
+            TestParentValue(_redpoint.otherParent);
+        }
     }
 
     public void ReportWithoutParent(Redpoint _redpoint)

--
Gitblit v1.8.0