Browse Source

修改bug

lzx 14 hours ago
parent
commit
d6bc3ff27d
1 changed files with 10 additions and 2 deletions
  1. 10 2
      Assets/Scripts/GameLogic/Hero/SkillInfo.cs

+ 10 - 2
Assets/Scripts/GameLogic/Hero/SkillInfo.cs

@@ -49,8 +49,16 @@ namespace GameLogic.Hero
             SkillData = skillId;
             skillConfig = ConfigComponent.Instance.Get<SkillConfig>(skillId.id * 10 + skillId.star - 1);
             SkillPowerupConfig = ConfigComponent.Instance.Get<SkillPowerupConfig>(skillId.level);
-            effectValue = new float[skillConfig.effectValue.Length];
-            Array.Copy(skillConfig.effectValue, effectValue, skillConfig.effectValue.Length);
+            if (skillConfig.effectValue != null)
+            {
+                effectValue = new float[skillConfig.effectValue.Length];
+                Array.Copy(skillConfig.effectValue, effectValue, skillConfig.effectValue.Length);
+            }
+            else
+            {
+                LogTool.Error("找不到技能id:" + (skillId.id * 10 + skillId.star - 1));
+            }
+
             if (skillConfig.intensifierIndex != null)
             {
                 for (int i = 0; i < skillConfig.intensifierIndex.Length; i++)