소스 검색

修改小红点

lzx 1 주 전
부모
커밋
88910f5518

+ 14 - 0
Assets/Res/Config/ReddotConfig.json

@@ -85,6 +85,20 @@
       "EnableForTarget": 0,
       "Layer": 1,
       "Enable": 1
+    },
+    {
+      "ID": 12,
+      "GroupID": 12,
+      "EnableForTarget": 0,
+      "Layer": 1,
+      "Enable": 1
+    },
+    {
+      "ID": 13,
+      "GroupID": 13,
+      "EnableForTarget": 0,
+      "Layer": 1,
+      "Enable": 1
     }
   ]
 }

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

@@ -118,7 +118,7 @@ RectTransform:
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
   m_AnchoredPosition: {x: 189.53296, y: -49.37755}
-  m_SizeDelta: {x: 0, y: 96.45}
+  m_SizeDelta: {x: 108, y: 96.45}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &5304083428607473890
 CanvasRenderer:

+ 11 - 1
Assets/Scripts/GameLogic/RedDot/RedDotData.cs

@@ -53,9 +53,19 @@ namespace Fort23.Mono
                             isEnable = RedDotManager.Instance.AllRedDotGroupData[GroupId].TargetLayerIsEnable(Layer);
                             break;
                         case 1:
+                            foreach (var _skillInfo in PlayerManager.Instance.GongFaControl.allSkill)
+                            {
+                                if (RedDotManager.Instance.isSkillStar(_skillInfo))
+                                {
+                                    isEnable = true;
+                                    return;
+                                }
+                            }
+
+                         
                             foreach (var _skillInfo in PlayerManager.Instance.GongFaControl.allUseSkill)
                             {
-                                if (RedDotManager.Instance.isSkillUpgrade(_skillInfo))
+                                if (RedDotManager.Instance.isSkillUpgradeDaYu4(_skillInfo))
                                 {
                                     isEnable = true;
                                     return;

+ 47 - 1
Assets/Scripts/GameLogic/RedDot/RedDotManager.cs

@@ -252,6 +252,12 @@ public class RedDotManager : Singleton<RedDotManager>
             case 10:
                 return IsFabaoUpgrade(value as FaBaoInfo);
                 break;
+            case 12:
+                return isSkillUpgrade(value as SkillInfo);
+                break;
+            case 13:
+                return isSkillStar(value as SkillInfo);
+                break;
         }
 
         return false;
@@ -268,7 +274,11 @@ public class RedDotManager : Singleton<RedDotManager>
         {
             return false;
         }
-        
+
+        if (PlayerManager.Instance.myHero.level.Value < _skillInfo.SkillPowerupConfig.PlayerLevelLimit)
+        {
+            return false;
+        }
 
         for (var i = 0; i < _skillInfo.SkillPowerupConfig.LevelupItem.Length; i++)
         {
@@ -282,6 +292,42 @@ public class RedDotManager : Singleton<RedDotManager>
         return true;
     }
 
+    public bool isSkillUpgradeDaYu4(SkillInfo _skillInfo)
+    {
+        if (_skillInfo == null)
+            return false;
+
+
+        var _skillPowerupConfigs = ConfigComponent.Instance.GetAll<SkillPowerupConfig>();
+
+
+        for (int i = _skillInfo.SkillPowerupConfig.ID; i < _skillInfo.SkillPowerupConfig.ID + 4; i++)
+        {
+            SkillPowerupConfig skillPowerupConfig = ConfigComponent.Instance.Get<SkillPowerupConfig>(i);
+            if (skillPowerupConfig.ID >= _skillPowerupConfigs.Length)
+            {
+                return false;
+            }
+
+            if (PlayerManager.Instance.myHero.level.Value < skillPowerupConfig.PlayerLevelLimit)
+            {
+                return false;
+            }
+
+            for (var j = 0; j < skillPowerupConfig.LevelupItem.Length; j++)
+            {
+                if (!PlayerManager.Instance.BagController.IsEnough(skillPowerupConfig.LevelupItem[j],
+                        skillPowerupConfig.LevelupItemNum[j]))
+                {
+                    return false;
+                }
+            }
+        }
+
+
+        return true;
+    }
+
     public bool isSkillStar(SkillInfo _skillInfo)
     {
         if (_skillInfo == null)

+ 5 - 3
Assets/Scripts/GameUI/UI/DivineSence/ShengShiEventWidgetType2.cs

@@ -68,7 +68,7 @@ namespace Fort23.Mono
             Btn_ZuiZhong.gameObject.SetActive(AccountFileInfo.Instance.playerData.CurrentZuiZhongEventListId !=
                                               eventList.guid);
             Btn_RemoveEvent.gameObject.SetActive(AccountFileInfo.Instance.playerData.CurrentZuiZhongEventListId !=
-                                                 eventList.guid);
+                eventList.guid && randomEventConfig.EventTriggerType != 4);
             ZuiZhongRoot.gameObject.SetActive(AccountFileInfo.Instance.playerData.CurrentZuiZhongEventListId ==
                                               eventList.guid);
         }
@@ -86,7 +86,7 @@ namespace Fort23.Mono
             this.goCallBack = goCallBack;
             randomEventConfig = ConfigComponent.Instance.Get<EventConfig>(eventList.eventID);
             evenkConfig = ConfigComponent.Instance.Get<EventLinkConfig>(eventList.curStep);
-            Btn_RemoveEvent.gameObject.SetActive(randomEventConfig.EventTriggerType != 4);
+            // Btn_RemoveEvent.gameObject.SetActive(randomEventConfig.EventTriggerType != 4);
 
             AccountFileInfo.EventLinkData eventLinkData =
                 eventList.eventLinks.FirstOrDefault(el => el.eventLinkId == eventList.curStep);
@@ -174,8 +174,10 @@ namespace Fort23.Mono
 
             Btn_ZuiZhong.gameObject.SetActive(AccountFileInfo.Instance.playerData.CurrentZuiZhongEventListId !=
                                               eventList.guid);
+
+
             Btn_RemoveEvent.gameObject.SetActive(AccountFileInfo.Instance.playerData.CurrentZuiZhongEventListId !=
-                                                 eventList.guid);
+                eventList.guid && randomEventConfig.EventTriggerType != 4);
 
             ZuiZhongRoot.gameObject.SetActive(AccountFileInfo.Instance.playerData.CurrentZuiZhongEventListId ==
                                               eventList.guid);

BIN
Excel2Json/Excel/Reddot.xlsx