Bläddra i källkod

修改了monster选取攻击目标的逻辑:只有自己GameStatusType标识为高价值单位时,才会优先攻击其它高价值单位。

大爷 1 år sedan
förälder
incheckning
c35a8d7896
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      XmdsCommonServer/Plugin/Units/XmdsInstanceMonster.cs

+ 2 - 1
XmdsCommonServer/Plugin/Units/XmdsInstanceMonster.cs

@@ -316,6 +316,7 @@ namespace XmdsCommonServer.Plugin.Units
                 InstanceUnit min = null;
                 float min_len = float.MaxValue;
                 bool isSpecial = false;
+                bool iamSpecial = Info.Properties is XmdsUnitProperties myprop && myprop.GameStatusType > XmdsUnitProperties.StatusType.Normal;
                 float guardRangSqua = mGuardRange * mGuardRange;
                 Parent.ForEachNearObjects(this.X, this.Y, this.Info.GuardRange, (InstanceUnit u, ref bool cancel) =>
                 {
@@ -330,7 +331,7 @@ namespace XmdsCommonServer.Plugin.Units
                         return;
                     }
 
-                    if (u.Info.Properties is XmdsUnitProperties prop && prop.GameStatusType > XmdsUnitProperties.StatusType.Normal)
+                    if (iamSpecial && u.Info.Properties is XmdsUnitProperties prop && prop.GameStatusType > XmdsUnitProperties.StatusType.Normal)
                     {
                         if (isSpecial)
                         {