소스 검색

修改bug

lzx 22 시간 전
부모
커밋
917fb9902d

+ 1 - 0
Assets/Scripts/GameUI/UI/DivineSence/DivineSenceInfoPanel.cs

@@ -34,6 +34,7 @@ namespace Fort23.Mono
         public override CTask GetFocus()
         {
             AppBarPanel.OpenPanel(this);
+            TitlePanel.ClosePanel();
             CustomInit(callback);
             return base.GetFocus();
         }

+ 6 - 0
Assets/Scripts/GameUI/UI/DivineSence/DivineSenceRestoredPanel.cs

@@ -56,6 +56,12 @@ namespace Fort23.Mono
 
             return await base.AsyncInit(uiData);
         }
+        
+        public override CTask GetFocus()
+        {
+            TitlePanel.ClosePanel();
+            return base.GetFocus();
+        }
 
 
         public async CTask CreatWidget()

+ 31 - 12
Assets/Scripts/GameUI/UI/XianTuLogPanel/XianTuLogInfoPanel.cs

@@ -77,7 +77,8 @@ namespace Fort23.Mono
         public async CTask CustomInit(int type, int id)
         {
             this.type = type;
-            eventLogTitleWidget = await UIManager.Instance.CreateGComponentForObject<EventLogTitleWidget>(EventLogTitleWidget, null);
+            eventLogTitleWidget =
+                await UIManager.Instance.CreateGComponentForObject<EventLogTitleWidget>(EventLogTitleWidget, null);
             Map<int, List<EventConfig>> eventConfigMap = new Map<int, List<EventConfig>>();
 
 
@@ -111,7 +112,15 @@ namespace Fort23.Mono
 
                 foreach (var eventConfig in keyValuePair.Value)
                 {
-                    AccountFileInfo.EventList eventList = AccountFileInfo.Instance.playerData.completeEvents.FirstOrDefault(cl => cl.eventID == eventConfig.ID);
+                    AccountFileInfo.EventList eventList =
+                        AccountFileInfo.Instance.playerData.completeEvents.FirstOrDefault(cl =>
+                            cl.eventID == eventConfig.ID);
+                    if (eventList == null)
+                    {
+                        eventList = AccountFileInfo.Instance.playerData.eventList.FirstOrDefault(cl =>
+                            cl.eventID == eventConfig.ID && eventConfig.EventTriggerType != 4 && cl.isCompleted);
+                    }
+
                     if (eventList == null)
                     {
                         //主线没有做不显示问好
@@ -140,7 +149,8 @@ namespace Fort23.Mono
                         showXianTuLogInfoData.Add(xianTuLogInfoData);
                         for (var i = 0; i < eventList.selectEventLinkIds.Count; i++)
                         {
-                            EventLinkConfig eventLinkConfig = ConfigComponent.Instance.Get<EventLinkConfig>(eventList.selectEventLinkIds[i]);
+                            EventLinkConfig eventLinkConfig =
+                                ConfigComponent.Instance.Get<EventLinkConfig>(eventList.selectEventLinkIds[i]);
                             if (eventLinkConfig.LanID != null)
                             {
                                 for (var i1 = 0; i1 < eventLinkConfig.LanID.Length; i1++)
@@ -150,11 +160,13 @@ namespace Fort23.Mono
                                     xianTuLogInfoData1.id = eventConfig.ID;
                                     if (eventLinkConfig.NPCID != 0)
                                     {
-                                        xianTuLogInfoData1.message = $"<color=#A6A6A6>{LanguageManager.Instance.Text(eventLinkConfig.LanID[i1])}</color>";
+                                        xianTuLogInfoData1.message =
+                                            $"<color=#A6A6A6>{LanguageManager.Instance.Text(eventLinkConfig.LanID[i1])}</color>";
                                     }
                                     else
                                     {
-                                        xianTuLogInfoData1.message = $"<color=#867169>{LanguageManager.Instance.Text(eventLinkConfig.LanID[i1])}</color>";
+                                        xianTuLogInfoData1.message =
+                                            $"<color=#867169>{LanguageManager.Instance.Text(eventLinkConfig.LanID[i1])}</color>";
                                     }
 
 
@@ -168,14 +180,17 @@ namespace Fort23.Mono
                                 XianTuLogInfoData xianTuLogInfoData1 = new XianTuLogInfoData();
                                 xianTuLogInfoData1.type = 3;
                                 xianTuLogInfoData1.id = eventConfig.ID;
-                                int index = eventLinkConfig.optionPara1.ToList().IndexOf(eventList.selectEventLinkIds[i + 1]);
+                                int index = eventLinkConfig.optionPara1.ToList()
+                                    .IndexOf(eventList.selectEventLinkIds[i + 1]);
                                 if (eventLinkConfig.NPCID != 0)
                                 {
-                                    xianTuLogInfoData1.message = $"<color=#A6A6A6>选项:{LanguageManager.Instance.Text(eventLinkConfig.optionPara2[index])}</color>";
+                                    xianTuLogInfoData1.message =
+                                        $"<color=#A6A6A6>选项:{LanguageManager.Instance.Text(eventLinkConfig.optionPara2[index])}</color>";
                                 }
                                 else
                                 {
-                                    xianTuLogInfoData1.message = $"<color=#867169>选项:{LanguageManager.Instance.Text(eventLinkConfig.optionPara2[index])}</color>";
+                                    xianTuLogInfoData1.message =
+                                        $"<color=#867169>选项:{LanguageManager.Instance.Text(eventLinkConfig.optionPara2[index])}</color>";
                                 }
 
                                 showXianTuLogInfoData.Add(xianTuLogInfoData1);
@@ -212,7 +227,8 @@ namespace Fort23.Mono
 
             if (xianTuLogInfoData.type == 1)
             {
-                EventLogTitleWidget eventLogTitleWidget = await UIManager.Instance.CreateGComponent<EventLogTitleWidget>(null, ContentRoot);
+                EventLogTitleWidget eventLogTitleWidget =
+                    await UIManager.Instance.CreateGComponent<EventLogTitleWidget>(null, ContentRoot);
                 eventLogTitleWidget.CustomInit(xianTuLogInfoData);
                 // titleWidgets.Add(eventLogTitleWidget);
                 components.Add(eventLogTitleWidget);
@@ -220,14 +236,16 @@ namespace Fort23.Mono
             }
             else if (xianTuLogInfoData.type == 2)
             {
-                EventLogInfoWidget eventLogInfoWidget = await UIManager.Instance.CreateGComponent<EventLogInfoWidget>(null, ContentRoot);
+                EventLogInfoWidget eventLogInfoWidget =
+                    await UIManager.Instance.CreateGComponent<EventLogInfoWidget>(null, ContentRoot);
                 eventLogInfoWidget.CustomInit(xianTuLogInfoData);
                 components.Add(eventLogInfoWidget);
                 return eventLogInfoWidget;
             }
             else if (xianTuLogInfoData.type == 3)
             {
-                EventLogMessageWidget eventLogInfoWidget = await UIManager.Instance.CreateGComponent<EventLogMessageWidget>(null, ContentRoot);
+                EventLogMessageWidget eventLogInfoWidget =
+                    await UIManager.Instance.CreateGComponent<EventLogMessageWidget>(null, ContentRoot);
                 eventLogInfoWidget.CustomInit(xianTuLogInfoData);
                 components.Add(eventLogInfoWidget);
                 return eventLogInfoWidget;
@@ -331,7 +349,8 @@ namespace Fort23.Mono
 
         public async static CTask OpenPanel(int type, int id)
         {
-            XianTuLogInfoPanel xianTuLogInfoPanel = await UIManager.Instance.LoadAndOpenPanel<XianTuLogInfoPanel>(null, uiData: new object[] { type, id });
+            XianTuLogInfoPanel xianTuLogInfoPanel =
+                await UIManager.Instance.LoadAndOpenPanel<XianTuLogInfoPanel>(null, uiData: new object[] { type, id });
             // xianTuLogInfoPanel.CustomInit(type, id);
         }
     }