Selaa lähdekoodia

修改单位是否有技能判断:如果所有技能AutoLaunch设为false,判定为无skill

大爷 1 vuosi sitten
vanhempi
commit
1f5194caff
1 muutettua tiedostoa jossa 10 lisäystä ja 1 poistoa
  1. 10 1
      Common/CommonAI/Zone/Instance/InstanceUnit.cs

+ 10 - 1
Common/CommonAI/Zone/Instance/InstanceUnit.cs

@@ -338,7 +338,16 @@ namespace CommonAI.Zone.Instance
         /// <summary>
         /// 此单位是否无技能
         /// </summary>
-        public bool IsNoneSkill { get { return mSkillStatus.Count == 0; } }
+        public bool IsNoneSkill { 
+            get 
+            {
+                foreach (SkillState st in mSkillStatus.Skills)
+                {
+                    if (st.LaunchSkill.AutoLaunch) return false;
+                }
+                return true;
+            } 
+        }
         /// <summary>
         /// 技能可产生位移,或者多段由服务器决定
         /// </summary>