Prechádzať zdrojové kódy

优化数值显示 修仙仙途日志bug 优化神识显示

lzx 2 dní pred
rodič
commit
4b3fc7dba3

+ 89 - 3
Assets/Res/UI/DivineSence/DivineSenceEventPreviewPanel.prefab

@@ -241,6 +241,7 @@ MonoBehaviour:
     packgJsonPath: /Art/UIAssets/TextrueJson\tongyong.txt
     packgSpritePath: Assets/Res/UIAtlas/tongyong.spriteatlasv2
     lasetJsonGUID: 009d01eadc79b5b12c19322b6a4cd057
+  imageH: 36.176
   useGradient: 0
   topOrLeftColor: {r: 1, g: 1, b: 1, a: 1}
   bottomOrRightColor: {r: 0, g: 0, b: 0, a: 1}
@@ -373,6 +374,7 @@ MonoBehaviour:
     packgJsonPath: /Art/UIAssets/TextrueJson\gongfa.txt
     packgSpritePath: Assets/Res/UIAtlas/gongfa.spriteatlasv2
     lasetJsonGUID: 3c03c9ef85decb2db50053e08067fb5c
+  imageH: 1624
   useGradient: 0
   topOrLeftColor: {r: 1, g: 1, b: 1, a: 1}
   bottomOrRightColor: {r: 0, g: 0, b: 0, a: 1}
@@ -897,6 +899,7 @@ MonoBehaviour:
     packgJsonPath: /Art/UIAssets/TextrueJson\tongyong.txt
     packgSpritePath: Assets/Res/UIAtlas/tongyong.spriteatlasv2
     lasetJsonGUID: 009d01eadc79b5b12c19322b6a4cd057
+  imageH: 84
   useGradient: 0
   topOrLeftColor: {r: 1, g: 1, b: 1, a: 1}
   bottomOrRightColor: {r: 0, g: 0, b: 0, a: 1}
@@ -1101,8 +1104,8 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 1, y: 1}
-  m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 0, y: 0}
+  m_AnchoredPosition: {x: 0, y: 61.7}
+  m_SizeDelta: {x: 0, y: -43.5784}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &7790443248632903804
 CanvasRenderer:
@@ -1145,7 +1148,7 @@ MonoBehaviour:
     m_HorizontalOverflow: 0
     m_VerticalOverflow: 0
     m_LineSpacing: 1
-  m_Text: "\u795E\u8BC6(2/10)"
+  m_Text: 2/10
 --- !u!1 &7244836889075663130
 GameObject:
   m_ObjectHideFlags: 0
@@ -1232,6 +1235,7 @@ MonoBehaviour:
     packgJsonPath: /Art/UIAssets/TextrueJson\tongyong.txt
     packgSpritePath: Assets/Res/UIAtlas/tongyong.spriteatlasv2
     lasetJsonGUID: 009d01eadc79b5b12c19322b6a4cd057
+  imageH: 80
   useGradient: 0
   topOrLeftColor: {r: 1, g: 1, b: 1, a: 1}
   bottomOrRightColor: {r: 0, g: 0, b: 0, a: 1}
@@ -1360,6 +1364,86 @@ MonoBehaviour:
     m_VerticalOverflow: 0
     m_LineSpacing: 1
   m_Text: "\u65E5\u5FD7"
+--- !u!1 &7587375694572286685
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 7
+  m_Component:
+  - component: {fileID: 7705849554225510677}
+  - component: {fileID: 3127181873672424435}
+  - component: {fileID: 1674366787068327515}
+  m_Layer: 0
+  m_HasEditorInfo: 1
+  m_Name: Text_ShenShiCount (1)
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &7705849554225510677
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 7587375694572286685}
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 1442258019244538206}
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0, y: 0}
+  m_AnchorMax: {x: 1, y: 1}
+  m_AnchoredPosition: {x: 0, y: 0}
+  m_SizeDelta: {x: 0, y: 0}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &3127181873672424435
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 7587375694572286685}
+  m_CullTransparentMesh: 1
+--- !u!114 &1674366787068327515
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 7587375694572286685}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 1
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_FontData:
+    m_Font: {fileID: 12800000, guid: e588d93665211944387ec8c03c8726ae, type: 3}
+    m_FontSize: 33
+    m_FontStyle: 1
+    m_BestFit: 0
+    m_MinSize: 10
+    m_MaxSize: 40
+    m_Alignment: 4
+    m_AlignByGeometry: 0
+    m_RichText: 1
+    m_HorizontalOverflow: 0
+    m_VerticalOverflow: 0
+    m_LineSpacing: 1
+  m_Text: "\u795E\u8BC6\u4E8B\u4EF6"
 --- !u!1 &7638606920926905235
 GameObject:
   m_ObjectHideFlags: 0
@@ -1393,6 +1477,7 @@ RectTransform:
   m_ConstrainProportionsScale: 0
   m_Children:
   - {fileID: 1549299383501015935}
+  - {fileID: 7705849554225510677}
   m_Father: {fileID: 8599819629026832582}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
@@ -1446,6 +1531,7 @@ MonoBehaviour:
     packgJsonPath: /Art/UIAssets/TextrueJson\tongyong.txt
     packgSpritePath: Assets/Res/UIAtlas/tongyong.spriteatlasv2
     lasetJsonGUID: 009d01eadc79b5b12c19322b6a4cd057
+  imageH: 80
   useGradient: 0
   topOrLeftColor: {r: 1, g: 1, b: 1, a: 1}
   bottomOrRightColor: {r: 0, g: 0, b: 0, a: 1}

+ 1 - 1
Assets/Res/UI/DivineSence/DivineSenceInfoPanel.prefab

@@ -224,7 +224,7 @@ RectTransform:
   m_AnchorMin: {x: 0, y: 0.5}
   m_AnchorMax: {x: 0, y: 0.5}
   m_AnchoredPosition: {x: 75.5, y: -24.899963}
-  m_SizeDelta: {x: 111.5581, y: 30}
+  m_SizeDelta: {x: 144.368, y: 30}
   m_Pivot: {x: 0, y: 0.5}
 --- !u!222 &2863420320959690301
 CanvasRenderer:

+ 9 - 38
Assets/Scripts/Core/UI/UTool/UtilTools.cs

@@ -586,7 +586,7 @@ namespace Utility
                 float n = number / 10000f;
                 string str = "";
                 str = GetTargetDecimalPlaceStr((int)n);
-                return str + "m";
+                return str + "";
             }
 
             if (number > 100000)
@@ -594,7 +594,7 @@ namespace Utility
                 float n = number / 1000f;
                 string str = "";
                 str = GetTargetDecimalPlaceStr((int)n);
-                return str + "k";
+                return str + "";
             }
 
             return number.ToString();
@@ -602,28 +602,12 @@ namespace Utility
 
         public static string ToStringEx(this int number)
         {
-            // if (number > 1000000000000)
-            // {
-            //     float n = number / 1000000000000f;
-            //     string str = "";
-            //     str = GetTargetDecimalPlaceStr((int)n);
-            //     return str + "t";
-            // }
-            //
-            // if (number > 1000000000)
-            // {
-            //     float n = number / 1000000000f;
-            //     string str = "";
-            //     str = GetTargetDecimalPlaceStr((int)n);
-            //     return str + "b";
-            // }
-
             if (number > 1000000)
             {
                 float n = number / 10000f;
                 string str = "";
                 str = GetTargetDecimalPlaceStr((int)n);
-                return str + "m";
+                return str + "万";
             }
 
             if (number > 100000)
@@ -631,21 +615,10 @@ namespace Utility
                 float n = number / 1000f;
                 string str = "";
                 str = GetTargetDecimalPlaceStr((int)n);
-                return str + "k";
+                return str + "";
             }
 
             return number.ToString();
-            // // if (isShowLongEx)
-            // {
-            //     if (i >= 10000000000)
-            //         return (i / 1000000000) + "B";
-            //     else if (i >= 10000000)
-            //         return (i / 1000000) + "M";
-            //     else if (i >= 10000)
-            //         return (i / 1000) + "K";
-            // }
-            //
-            // return i.ToString();
         }
 #endif
         /// <summary>
@@ -862,7 +835,7 @@ namespace Utility
                 return (T)formatter.Deserialize(memoryStream);
             }
         }
-        
+
         public static T GetRandomByWeight<T>(List<T> items, int[] weights)
         {
             if (items.Count != weights.Length)
@@ -886,10 +859,9 @@ namespace Utility
             // 理论上不会到达这里,但为了安全返回最后一个元素
             return items[items.Count - 1];
         }
-        
+
         public static T GetRandomByWeight<T>(List<T> items, float[] weights)
         {
-            
             if (items.Count != weights.Length)
             {
                 LogTool.Error("权重和数组长度不一致");
@@ -910,7 +882,7 @@ namespace Utility
             // 理论上不会到达这里,但为了安全返回最后一个元素
             return items[items.Count - 1];
         }
-        
+
         // 计算每个权重的概率
         public static List<float> CalculateProbabilities(List<float> weights)
         {
@@ -939,7 +911,7 @@ namespace Utility
 
             return probabilities;
         }
-        
+
         // 计算每个权重的概率
         public static List<float> CalculateProbabilities(List<int> weights)
         {
@@ -968,7 +940,7 @@ namespace Utility
 
             return probabilities;
         }
-        
+
         public static string GetString(string a, float[] b)
         {
             if (a == null || a == "" || b == null)
@@ -1017,7 +989,6 @@ namespace Utility
 
             return a;
         }
-        
     }
 
 

+ 6 - 1
Assets/Scripts/GameLogic/Player/AccountFileInfo.cs

@@ -40,7 +40,12 @@ public class AccountFileInfo : Singleton<AccountFileInfo>
         /// <summary>
         /// 神识点
         /// </summary>
-        public int divineSensePoint = 0;
+        public float divineSensePoint = 0;
+        
+        /// <summary>
+        /// 今天回复的神识值
+        /// </summary>
+        public float todayDivineSensePoint = 0;
 
         /// <summary>
         /// 神识经验

+ 1 - 0
Assets/Scripts/GameLogic/Player/PlayerManager.cs

@@ -360,6 +360,7 @@ public class PlayerManager : Singleton<PlayerManager>
             AccountFileInfo.Instance.playerData.nextRefence =
                 TimeHelper.GetBaseRefreshTime(TimeHelper.ClientNow());
             AccountFileInfo.Instance.playerData.todayUseExpElixrPanelCount = 0;
+            AccountFileInfo.Instance.playerData.todayDivineSensePoint = 0;
             AccountFileInfo.Instance.SavePlayerData();
         }
 

+ 11 - 6
Assets/Scripts/GameUI/EventManager/EventSystemManager.cs

@@ -57,10 +57,6 @@ public class EventSystemManager : Singleton<EventSystemManager>
             }
         }
 
-        // foreach (var playerDataEventConditionData in AccountFileInfo.Instance.playerData.eventConditionDatas)
-        // {
-        //     EventConditionDataMap.Add(playerDataEventConditionData.guid, playerDataEventConditionData);
-        // }
 
         StaticUpdater.Instance.AddRenderUpdateCallBack(Update);
         EventManager.Instance.AddEventListener(CustomEventType.DetectRandomEvent, RenfenceRandomEvent);
@@ -102,7 +98,16 @@ public class EventSystemManager : Singleton<EventSystemManager>
             HeroPowerUpConfig heroPowerUpConfig = PlayerManager.Instance.myHero.powerUpConfig;
             if (AccountFileInfo.Instance.playerData.divineSensePoint < heroPowerUpConfig.ShenshiMax)
             {
-                AccountFileInfo.Instance.playerData.divineSensePoint += 3;
+                if (AccountFileInfo.Instance.playerData.todayDivineSensePoint < PlayerManager.Instance.gameConstantConfig.shenshiPointRecSPD[0])
+                {
+                    AccountFileInfo.Instance.playerData.todayDivineSensePoint += PlayerManager.Instance.gameConstantConfig.shenshiPointRecSPD[1];
+                    AccountFileInfo.Instance.playerData.divineSensePoint += PlayerManager.Instance.gameConstantConfig.shenshiPointRecSPD[1];
+                }
+                else
+                {
+                    AccountFileInfo.Instance.playerData.divineSensePoint += PlayerManager.Instance.gameConstantConfig.shenshiPointRecSPD[2];
+                }
+
                 EventManager.Instance.Dispatch(CustomEventType.DivineSensePointChange, null);
                 AccountFileInfo.Instance.SavePlayerData();
             }
@@ -131,7 +136,7 @@ public class EventSystemManager : Singleton<EventSystemManager>
 
 
         HeroPowerUpConfig heroPowerUpConfig = PlayerManager.Instance.myHero.powerUpConfig;
-        int count = AccountFileInfo.Instance.playerData.divineSensePoint / PlayerManager.Instance.gameConstantConfig.DetectEventCount;
+        int count = (int)(AccountFileInfo.Instance.playerData.divineSensePoint / PlayerManager.Instance.gameConstantConfig.DetectEventCount);
         if (count <= 0)
         {
             //神识值不够

+ 1 - 1
Assets/Scripts/GameUI/UI/DivineSence/DivineSenceEventPreviewPanel.cs

@@ -108,7 +108,7 @@ namespace Fort23.Mono
 
             int maxCount = PlayerManager.Instance.myHero.powerUpConfig.ShenshiMax / PlayerManager.Instance.gameConstantConfig.DetectEventCount;
 
-            Text_ShenShiCount.text = $"神识{EventSystemManager.Instance.GetShenShiCount()}/{maxCount}";
+            Text_ShenShiCount.text = $"{EventSystemManager.Instance.GetShenShiCount()}/{maxCount}";
             SaiXuan(saixuanType);
             showEventList.Sort(Sort);
             await Content.Init(this, showEventList.Count);

+ 13 - 15
Assets/Scripts/GameUI/UI/DivineSence/DivineSenceInfoPanel.cs

@@ -13,11 +13,11 @@ namespace Fort23.Mono
     [UIBinding(prefab = "DivineSenceInfoPanel")]
     public partial class DivineSenceInfoPanel : UIPanel
     {
-        private Action<int,List<ItemInfo>> callback;
+        private Action<int, List<ItemInfo>> callback;
 
         private int useCount = 0;
-        
-        
+
+
         List<ItemInfo> useItems = new List<ItemInfo>();
 
         List<DivineSenceInfoBtnWidget> _divineSenceInfoBtnWidgets = new List<DivineSenceInfoBtnWidget>();
@@ -46,12 +46,13 @@ namespace Fort23.Mono
                 useItems.Clear();
                 foreach (var senceInfoBtnWidget in _divineSenceInfoBtnWidgets)
                 {
-                    if (senceInfoBtnWidget.type == 2 && senceInfoBtnWidget.ItemInfo != null )
+                    if (senceInfoBtnWidget.type == 2 && senceInfoBtnWidget.ItemInfo != null)
                     {
                         useItems.Add(senceInfoBtnWidget.ItemInfo);
                     }
                 }
-                callback?.Invoke(useCount,useItems);
+
+                callback?.Invoke(useCount, useItems);
                 UIManager.Instance.HideUIUIPanel(this);
             });
             Btn_Back.onClick.AddListener(() => { UIManager.Instance.HideUIUIPanel(this); });
@@ -68,15 +69,12 @@ namespace Fort23.Mono
             });
 
             Btn_Tip.onClick.AddListener(() => { DivineSenceLevelPreviewPanel.OpenPanel(); });
-            
-            
-            Btn_Event.onClick.AddListener(() =>
-            {
-                DivineSenceEventPreviewPanel.OpenPanel();
-            });
+
+
+            Btn_Event.onClick.AddListener(() => { DivineSenceEventPreviewPanel.OpenPanel(); });
         }
 
-        public async void CustomInit(Action<int,List<ItemInfo>> callback)
+        public async void CustomInit(Action<int, List<ItemInfo>> callback)
         {
             _divineSenceInfoBtnWidgets.Clear();
             divineSenseConfig = ConfigComponent.Instance.Get<DivineSenseConfig>(AccountFileInfo.Instance.playerData.divineSenseLevel);
@@ -87,7 +85,7 @@ namespace Fort23.Mono
             Slider_Exp.maxValue = divineSenseConfig.exp;
             Slider_Exp.value = AccountFileInfo.Instance.playerData.divineSenseexp;
 
-            int count = AccountFileInfo.Instance.playerData.divineSensePoint / PlayerManager.Instance.gameConstantConfig.DetectEventCount;
+            int count = (int)(AccountFileInfo.Instance.playerData.divineSensePoint / PlayerManager.Instance.gameConstantConfig.DetectEventCount);
             maxCount = heroPowerUpConfig.ShenshiMax / PlayerManager.Instance.gameConstantConfig.DetectEventCount;
             maxCount = maxCount > 10 ? 10 : maxCount;
             count = count + EventSystemManager.Instance.GetShenShiCount() > maxCount ? maxCount - EventSystemManager.Instance.GetShenShiCount() : count;
@@ -161,7 +159,7 @@ namespace Fort23.Mono
 
             foreach (var keyValuePair in probabilitiesMap)
             {
-                QualityBonusChance[keyValuePair.Key-1] *= keyValuePair.Value+0.01f;
+                QualityBonusChance[keyValuePair.Key - 1] *= keyValuePair.Value + 0.01f;
             }
 
             List<float> probabilities = UtilTools.CalculateProbabilities(QualityBonusChance);
@@ -171,7 +169,7 @@ namespace Fort23.Mono
             }
         }
 
-        public async static CTask OpenPanel(Action<int,List<ItemInfo>> callback)
+        public async static CTask OpenPanel(Action<int, List<ItemInfo>> callback)
         {
             DivineSenceInfoPanel divineSenceInfoPanel = await UIManager.Instance.LoadAndOpenPanel<DivineSenceInfoPanel>(null, UILayer.Middle);
             divineSenceInfoPanel.CustomInit(callback);

+ 6 - 4
Assets/Scripts/GameUI/UI/DivineSence/ShengShiEventWidgetType2.cs

@@ -182,12 +182,14 @@ namespace Fort23.Mono
                 for (var i = 0; i < randomEventConfig.PrizeIDs.Length; i++)
                 {
                     DropConfig dropConfig = ConfigComponent.Instance.Get<DropConfig>(randomEventConfig.PrizeIDs[i]);
-                    foreach (var i1 in dropConfig.showItemId)
+                    if (dropConfig.showItemId != null)
                     {
-                        ItemInfo itemInfo = new ItemInfo( i1, randomEventConfig.PrizeNums[i]);
-                        itemInfos.Add(itemInfo);
+                        foreach (var i1 in dropConfig.showItemId)
+                        {
+                            ItemInfo itemInfo = new ItemInfo( i1, randomEventConfig.PrizeNums[i]);
+                            itemInfos.Add(itemInfo);
+                        }
                     }
-       
                 }
 
                 for (var i = 0; i < itemInfos.Count; i++)

+ 2 - 1
Assets/Scripts/GameUI/UI/MainHeroPnael/ItemWidgetType1.cs

@@ -2,6 +2,7 @@ using Excel2Json;
 using Fort23.UTool;
 using UnityEngine;
 using UnityEngine.UI;
+using Utility;
 
 namespace Fort23.Mono
 {
@@ -29,7 +30,7 @@ namespace Fort23.Mono
 		{
 			ItemConfig itemConfig = ConfigComponent.Instance.Get<ItemConfig>(id);
 			Icon_ItemIcon.icon_name = itemConfig.icon;
-			Text_Count.text = $"{count}/{PlayerManager.Instance.BagController.GetItemCount(id)}";
+			Text_Count.text = $"{count}/{PlayerManager.Instance.BagController.GetItemCount(id).ToStringEx()}";
 			LayoutRebuilder.ForceRebuildLayoutImmediate(Text_Count.GetComponent<RectTransform>());
 			LayoutRebuilder.ForceRebuildLayoutImmediate(transform);
 		}

+ 2 - 33
Assets/Scripts/GameUI/UI/ShopPanel/EnergyWidget.cs

@@ -42,18 +42,7 @@ namespace Fort23.Mono
         {
             Btn_Coin.onClick.AddListener(() =>
             {
-                // if (_itemConfig.ID == GlobalParam.Item_Coin_ID)
-                // {
-                //     OnClickIcon_Coin_button();
-                // }
-                // else  if (_itemConfig.ID == GlobalParam.Item_Diamond_ID)
-                // {
-                //     OnClickIcon_Diamon_button();
-                // }
-                // else  if (_itemConfig.ID == GlobalParam.Item_HeroExp_ID)
-                // {
-                //     OnClickIcon_HeroExp_button();
-                // }
+       
                 if (_itemConfig.associateID == 3)
                 {
                     GongFaDetailsPanel.Open(new ItemInfo(_itemConfig.ID));
@@ -70,27 +59,7 @@ namespace Fort23.Mono
         }
 
 
-        private void OnClickIcon_HeroExp_button()
-        {
-            // TipMessagePanel.OpenTipMessagePanel("英雄经验,可用于升级英雄等级<color=#ff0000>(每杀死一个小怪能获得经验,击杀boss能获得大量经验)</color>",
-            //     new Vector2(Icon_HeroExp_button.transform.position.x, Icon_HeroExp_button.transform.position.y - 0.5f));
-            TipMessagePanel.OpenTipMessagePanel(LanguageManager.Instance.Text(104),
-                new Vector2(Icon_Energy.transform.position.x, Icon_Energy.transform.position.y - 0.5f));
-        }
-
-        private void OnClickIcon_Coin_button()
-        {
-            // TipMessagePanel.OpenTipMessagePanel("金币,用于抽取英雄宝箱<color=#ff0000>(每杀死一个小怪有几率获得金币,击杀boss能获得大量金币)</color>",
-            //     new Vector2(Icon_Coin_button.transform.position.x, Icon_Coin_button.transform.position.y - 0.5f));
-            TipMessagePanel.OpenTipMessagePanel(LanguageManager.Instance.Text(105),
-                new Vector2(Icon_Energy.transform.position.x, Icon_Energy.transform.position.y - 0.5f));
-        }
-
-        private void OnClickIcon_Diamon_button()
-        {
-            TipMessagePanel.OpenTipMessagePanel(LanguageManager.Instance.Text(106),
-                new Vector2(Icon_Energy.transform.position.x, Icon_Energy.transform.position.y - 0.5f));
-        }
+   
 
 
         public void CustomInit(int id)

+ 18 - 2
Assets/Scripts/GameUI/UI/XianTuLogPanel/EventLogTitleWidget.cs

@@ -7,6 +7,7 @@ namespace Fort23.Mono
 	public partial class EventLogTitleWidget : ItemWidgetBasic
 	{
 		public XianTuLogInfoData data;
+		public XianTuData xiantuData;
 		private void Init()
 		{
 
@@ -24,9 +25,18 @@ namespace Fort23.Mono
 
 		}
 		
-		public void CustomInit(string text)
+		public void CustomInit(string  s)
 		{
-			Text_Name.text = text;
+			
+			Text_Name.text = s;
+			LayoutRebuilder.ForceRebuildLayoutImmediate(Text_Name.GetComponent<RectTransform>());
+			LayoutRebuilder.ForceRebuildLayoutImmediate(Text_Name.transform.parent.GetComponent<RectTransform>());
+		}
+		
+		public void CustomInit(XianTuData xiuData)
+		{
+			xiantuData = xiuData;
+			Text_Name.text = xiantuData.name;
 			LayoutRebuilder.ForceRebuildLayoutImmediate(Text_Name.GetComponent<RectTransform>());
 			LayoutRebuilder.ForceRebuildLayoutImmediate(Text_Name.transform.parent.GetComponent<RectTransform>());
 		}
@@ -39,5 +49,11 @@ namespace Fort23.Mono
 			LayoutRebuilder.ForceRebuildLayoutImmediate(Text_Name.transform.parent.GetComponent<RectTransform>());
 		}
 
+		public override void DestroyObj()
+		{
+			xiantuData = null;
+			data = null;
+			base.DestroyObj();
+		}
 	}
 }

+ 9 - 4
Assets/Scripts/GameUI/UI/XianTuLogPanel/EventLogWidget.cs

@@ -14,6 +14,8 @@ namespace Fort23.Mono
         private XianTuLogConfig _xianTuLogConfig;
         List<EventMinLogWidget> eventMinLogWidgets = new List<EventMinLogWidget>();
 
+        public XianTuData XianTuData;
+
         private void Init()
         {
         }
@@ -32,11 +34,12 @@ namespace Fort23.Mono
             Btn_HuiGu.onClick.AddListener(() => { XianTuLogInfoPanel.OpenPanel(2,_xianTuLogConfig.ID); });
         }
 
-        public async CTask CustomInit(XianTuLogConfig xianTuLogConfig, List<int> places)
+        public async CTask CustomInit( XianTuData xianTuData, List<int> places)
         {
-            _xianTuLogConfig = xianTuLogConfig;
-            Text_Title.text = LanguageManager.Instance.Text(xianTuLogConfig.Title);
-            Text_Desc.text = LanguageManager.Instance.Text(xianTuLogConfig.Desc);
+            XianTuData = xianTuData;
+            _xianTuLogConfig = xianTuData.xianTuLogConfig;
+            Text_Title.text = LanguageManager.Instance.Text(_xianTuLogConfig.Title);
+            Text_Desc.text = LanguageManager.Instance.Text(_xianTuLogConfig.Desc);
 
             if (EventSystemManager.Instance.eventConfigsMap.ContainsKey(_xianTuLogConfig.ID))
             {
@@ -63,6 +66,8 @@ namespace Fort23.Mono
 
             eventMinLogWidgets.Clear();
 
+            XianTuData = null;
+            
             base.DormancyObj();
         }
     }

+ 1 - 1
Assets/Scripts/GameUI/UI/XianTuLogPanel/XianTuLogInfoPanel.cs

@@ -185,7 +185,7 @@ namespace Fort23.Mono
             {
                 // eventLogTitleWidget.SetActive(true);
                 Sv.SetParent(Marsk1, false);
-                eventLogTitleWidget.CustomInit(showXianTuLogInfoData[0].message);
+                eventLogTitleWidget.CustomInit(showXianTuLogInfoData[0]);
                 eventLogTitleWidget.own.SetActive(true);
             }
             else if (type == 2)

+ 57 - 21
Assets/Scripts/GameUI/UI/XianTuLogPanel/XianTuLogPanel.cs

@@ -15,6 +15,7 @@ namespace Fort23.Mono
         public int type;
         public string name;
         public XianTuLogConfig xianTuLogConfig;
+        public XianTuData fatherXianTuData;
     }
 
     [UIBinding(prefab = "XianTuLogPanel")]
@@ -33,7 +34,6 @@ namespace Fort23.Mono
 
         List<XianTuData> xianTuDatas = new List<XianTuData>();
 
-        List<EventLogTitleWidget> xianTuTitleWidgets = new List<EventLogTitleWidget>();
 
         List<int> places = new List<int>();
 
@@ -41,6 +41,8 @@ namespace Fort23.Mono
 
         Map<int, List<int>> xianTuMapConfigd = new Map<int, List<int>>();
 
+        List<UIComponent> components = new List<UIComponent>();
+
         private void Init()
         {
             isAddStack = true;
@@ -82,7 +84,7 @@ namespace Fort23.Mono
             UIManager.Instance.DormancyAllGComponent<MainEventLogWidget>();
             UIManager.Instance.DormancyAllGComponent<EventLogWidget>();
             UIManager.Instance.DormancyAllGComponent<EventLogTitleWidget>();
-            xianTuTitleWidgets.Clear();
+
             type = 1;
             shoeXianTuLogConfigs = GetTypeXiantuLogConfigs(type);
             XaiXuanMap(shoeXianTuLogConfigs);
@@ -104,7 +106,7 @@ namespace Fort23.Mono
             UIManager.Instance.DormancyAllGComponent<MainEventLogWidget>();
             UIManager.Instance.DormancyAllGComponent<EventLogWidget>();
             UIManager.Instance.DormancyAllGComponent<EventLogTitleWidget>();
-            xianTuTitleWidgets.Clear();
+            components.Clear();
             type = 2;
             shoeXianTuLogConfigs = GetTypeXiantuLogConfigs(type);
             XaiXuanMap(shoeXianTuLogConfigs);
@@ -220,6 +222,7 @@ namespace Fort23.Mono
                     XianTuData xianTuData2 = new XianTuData();
                     xianTuData2.type = 2;
                     xianTuData2.xianTuLogConfig = xianTuLogConfig;
+                    xianTuData2.fatherXianTuData = xianTuData;
                     xianTuDatas.Add(xianTuData2);
                 }
 
@@ -347,7 +350,7 @@ namespace Fort23.Mono
             UIManager.Instance.DormancyAllGComponent<EventLogWidget>();
             shoeXianTuLogConfigs = GetTypeXiantuLogConfigs(type);
             XaiXuanMap(shoeXianTuLogConfigs);
-
+            components.Clear();
             if (xianTuDatas.Count > 0)
             {
                 eventLogTitleWidget.own.SetActive(true);
@@ -365,16 +368,16 @@ namespace Fort23.Mono
 
         private List<XianTuLogConfig> GetTypeXiantuLogConfigs(int type)
         {
-            List<XianTuLogConfig> xiaNTYULogConfigs = new List<XianTuLogConfig>();
+            List<XianTuLogConfig> xianTuLogConfiges = new List<XianTuLogConfig>();
             foreach (var xianTuLogConfig in xianTuLogConfigs)
             {
                 if (xianTuLogConfig.EventType == type)
                 {
-                    xiaNTYULogConfigs.Add(xianTuLogConfig);
+                    xianTuLogConfiges.Add(xianTuLogConfig);
                 }
             }
 
-            return xiaNTYULogConfigs;
+            return xianTuLogConfiges;
         }
 
         public async CTask<IScorllListWidget> GetIScorllListWidget(int index, RectTransform root)
@@ -397,15 +400,16 @@ namespace Fort23.Mono
                 if (xianTuData.type == 1)
                 {
                     EventLogTitleWidget eventLogTitleWidget = await UIManager.Instance.CreateGComponent<EventLogTitleWidget>(null, Content.GetComponent<RectTransform>());
-                    eventLogTitleWidget.CustomInit(xianTuData.name);
-                    xianTuTitleWidgets.Add(eventLogTitleWidget);
+                    eventLogTitleWidget.CustomInit(xianTuData);
+                    components.Add(eventLogTitleWidget);
+                    // xianTuTitleWidgets.Add(eventLogTitleWidget);
                     return eventLogTitleWidget;
                 }
                 else
                 {
                     EventLogWidget EventLogWidget = await UIManager.Instance.CreateGComponent<EventLogWidget>(null, Content.GetComponent<RectTransform>());
-                    await EventLogWidget.CustomInit(xianTuData.xianTuLogConfig, places);
-
+                    await EventLogWidget.CustomInit(xianTuData, places);
+                    components.Add(EventLogWidget);
                     return EventLogWidget;
                 }
             }
@@ -414,9 +418,9 @@ namespace Fort23.Mono
         public void HindIScorllListWidget(IScorllListWidget widget)
         {
             UIManager.Instance.DormancyGComponent(widget as UIComponent);
-            if (xianTuTitleWidgets.Contains(widget as EventLogTitleWidget))
+            if (components.Contains(widget as UIComponent))
             {
-                xianTuTitleWidgets.Remove(widget as EventLogTitleWidget);
+                components.Remove(widget as EventLogTitleWidget);
             }
         }
 
@@ -425,31 +429,63 @@ namespace Fort23.Mono
             XianTuLogPanel xianTuLogPanel = await UIManager.Instance.LoadAndOpenPanel<XianTuLogPanel>(null);
         }
 
+        List<UIComponent> _components = new List<UIComponent>();
+        private float maxY;
+        private float minY;
+
         [CustomMethod(CustomMethodType.Update)]
         public void Update()
         {
             if (type != 2)
                 return;
-            EventLogTitleWidget highestItem = null;
-            float maxY = float.MinValue;
 
 
-            foreach (var xianTuTitleWidget in xianTuTitleWidgets)
+            UIComponent highestItem = null;
+            maxY = float.MinValue;
+            minY = float.MaxValue;
+            _components.Clear();
+
+
+            foreach (var xianTuTitleWidget in components)
             {
                 float itemY = xianTuTitleWidget.own.transform.position.y; // 使用世界坐标的 Y 值
-                if (itemY > maxY)
+                if (itemY > eventLogTitleWidget.own.transform.position.y)
                 {
                     maxY = itemY;
-                    highestItem = xianTuTitleWidget;
+
+                    _components.Add(xianTuTitleWidget);
                 }
             }
 
+            foreach (var uiComponent in _components)
+            {
+                float itemY = uiComponent.own.transform.position.y; // 使用世界坐标的 Y 值
+                if (itemY < minY)
+                {
+                    minY = itemY;
+                    highestItem = uiComponent;
+                }
+            }
+
+
             if (highestItem != null)
             {
                 float outsideY = eventLogTitleWidget.own.transform.position.y;
-                if (maxY > outsideY - 5)
+                if (maxY > outsideY)
                 {
-                    eventLogTitleWidget.CustomInit(highestItem.Text_Name.text);
+                    XianTuData xianTuData = default;
+                    if (highestItem is EventLogTitleWidget)
+                    {
+                        EventLogTitleWidget eventLogTitleWidget = highestItem as EventLogTitleWidget;
+                        xianTuData = eventLogTitleWidget.xiantuData;
+                    }
+                    else if (highestItem is EventLogWidget)
+                    {
+                        EventLogWidget eventLogWidget = highestItem as EventLogWidget;
+                        xianTuData = eventLogWidget.XianTuData.fatherXianTuData;
+                    }
+
+                    eventLogTitleWidget.CustomInit(xianTuData.name);
                 }
             }
         }
@@ -459,7 +495,7 @@ namespace Fort23.Mono
             UIManager.Instance.DormancyAllGComponent<MainEventLogWidget>();
             UIManager.Instance.DormancyAllGComponent<EventLogWidget>();
             UIManager.Instance.DormancyAllGComponent<EventLogTitleWidget>();
-            xianTuTitleWidgets.Clear();
+            components.Clear();
             type = 0;
             foreach (var bigMapXianTuSaiWidget in bigMapXianTuSaiWidgets)
             {