Ver código fonte

【BUG】MMO-20026: 拾取状态被打断后,需要继续接上

meijun 3 anos atrás
pai
commit
a028664cfb

+ 14 - 1
Common/CommonAI/Zone/Instance/InstanceUnit.StateMachine.cs

@@ -4021,6 +4021,7 @@ namespace CommonAI.Zone.Instance
             public readonly InstanceItem targetObject;
 			private long mLockEndTime;
 			private bool mDoPick;
+			private bool mMarkBlock;
 
             public StateFollowAndPickItem(InstanceUnit unit, InstanceItem target, bool doPick)
                 : base(unit, target, false)
@@ -4033,6 +4034,12 @@ namespace CommonAI.Zone.Instance
             {
                 get { return (targetObject.Enable && targetObject.IsPosValid()) || mLockEndTime > CommonLang.CUtils.localTimeMS; }
             }
+
+			public bool IsBlock()
+			{
+				return this.mMarkBlock;
+			}
+
             protected override bool CheckTargetInMinRange()
             {
                 return CMath.includeRoundPoint(unit.X, unit.Y, unit.BodyBlockSize, targetObject.X, targetObject.Y);
@@ -4090,9 +4097,15 @@ namespace CommonAI.Zone.Instance
 				{
 					return false;
 				}
-
+				
 				return true;
 			}
+
+			protected override void onStop()
+			{
+				this.mMarkBlock = true;
+			}
+
 		}
 
 

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

@@ -687,7 +687,7 @@ namespace XmdsCommonServer.Plugin.Units
 			}
 
 
-			if (mFocusPickItem == null || !mFocusPickItem.IsActive)
+			if (mFocusPickItem == null || !mFocusPickItem.IsActive || mFocusPickItem.IsBlock())
 			{
 				bool leaderInView = false;
 				if (this.mTeamVirtual != null && this.canFollowTeam && this.leadingMan != null && this.leadingMan.Enable)