浏览代码

MMO-19296: 负面状态,不允许上坐骑

meijun 3 年之前
父节点
当前提交
3f4afa78d5

+ 1 - 1
XmdsCommonServer/Plugin/Team/XmdsTeamVirtual.cs

@@ -169,7 +169,7 @@ public class XmdsTeamVirtual
                 if (member != TeamLeader && member.canFollowTeam)
                 {
                     var virt = member.Virtual as XmdsCommonServer.Plugin.XmdsVirtual;
-                    if (!virt.IsMounted)
+                    if (!virt.IsMounted && !virt.IsInDebuffStatus())
                     {
                         PlayerSummonMountEventR2B r2b = new PlayerSummonMountEventR2B();
                         r2b.TimeMS = 0;

+ 3 - 3
XmdsCommonServer/Plugin/Units/XmdsInstancePlayer.cs

@@ -1936,7 +1936,7 @@ namespace XmdsCommonServer.Plugin.Units
                 {
                     this.changeState(this.stateFollow);
                     var virt = this.Virtual as XmdsVirtual;
-                    if (!virt.IsMounted && !CMath.includeRoundPoint(this.X, this.Y, this.Templates.CFG.TEAMER_FOLLOW_DISTANCE_LIMIT, this.leadingMan.X, this.leadingMan.Y))
+                    if (!virt.IsMounted && !virt.IsInDebuffStatus() && !CMath.includeRoundPoint(this.X, this.Y, this.Templates.CFG.TEAMER_FOLLOW_DISTANCE_LIMIT, this.leadingMan.X, this.leadingMan.Y))
                     {
                         PlayerSummonMountEventR2B r2b = new PlayerSummonMountEventR2B();
                         r2b.TimeMS = 0;
@@ -2030,7 +2030,7 @@ namespace XmdsCommonServer.Plugin.Units
 			{
 				case MoveState.Move:
 					var virt = unit.Virtual as XmdsVirtual;
-					if (!virt.IsMounted && !CMath.includeRoundPoint(unit.X, unit.Y, unit.Templates.CFG.TEAMER_FOLLOW_DISTANCE_LIMIT, follower.X, follower.Y))
+					if (!virt.IsMounted && !virt.IsInDebuffStatus() && !CMath.includeRoundPoint(unit.X, unit.Y, unit.Templates.CFG.TEAMER_FOLLOW_DISTANCE_LIMIT, follower.X, follower.Y))
 					{
 						//Console.WriteLine("请求上马");
 						PlayerSummonMountEventR2B r2b = new PlayerSummonMountEventR2B();
@@ -2050,7 +2050,7 @@ namespace XmdsCommonServer.Plugin.Units
 		protected override void onChangedToMove(IPositionObject target)
 		{
 			var virt = unit.Virtual as XmdsVirtual;
-			if (!virt.IsMounted && !CMath.includeRoundPoint(unit.X, unit.Y, unit.Templates.CFG.TEAMER_FOLLOW_DISTANCE_LIMIT, follower.X, follower.Y))
+			if (!virt.IsMounted && !virt.IsInDebuffStatus() && !CMath.includeRoundPoint(unit.X, unit.Y, unit.Templates.CFG.TEAMER_FOLLOW_DISTANCE_LIMIT, follower.X, follower.Y))
 			{
 
 				PlayerSummonMountEventR2B r2b = new PlayerSummonMountEventR2B();

+ 1 - 1
XmdsCommonServer/Plugin/XmdsVirtual/XmdsVirtual.cs

@@ -484,7 +484,7 @@ namespace XmdsCommonServer.Plugin
         /// 是否在异常状态内.
         /// </summary>
         /// <returns></returns>
-        protected bool IsInDebuffStatus()
+        public bool IsInDebuffStatus()
         {
             bool ret = false;