Skip to content

Commit b5a4cd3

Browse files
committed
dont interact when is dragging
1 parent e33fad4 commit b5a4cd3

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

Intersect.Client.Core/Entities/Entity.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Intersect.Client.Framework.Entities;
88
using Intersect.Client.Framework.GenericClasses;
99
using Intersect.Client.Framework.Graphics;
10+
using Intersect.Client.Framework.Gwen.DragDrop;
1011
using Intersect.Client.Framework.Items;
1112
using Intersect.Client.Framework.Maps;
1213
using Intersect.Client.General;
@@ -1368,7 +1369,7 @@ private int NormalSpriteAnimationFrame
13681369
// Checks if the entity is attacking or not.
13691370
// Note: the calculation differs with IsAttacking because
13701371
// frames are intended to behave differently with normal sprite-sheets.
1371-
else if (AttackTimer - (CalculateAttackTime() / 2) > Timing.Global.Milliseconds)
1372+
else if (AttackTimer - (CalculateAttackTime() / 2) > Timing.Global.Milliseconds && !DragAndDrop.IsDragging)
13721373
{
13731374
frame = Options.Instance.Sprites.NormalAttackFrame;
13741375
}

Intersect.Client.Core/Entities/Player.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Intersect.Client.Framework.Gwen.Control;
88
using Intersect.Client.Framework.Gwen.Control.EventArguments;
99
using Intersect.Client.Framework.Gwen.Control.EventArguments.InputSubmissionEvent;
10+
using Intersect.Client.Framework.Gwen.DragDrop;
1011
using Intersect.Client.Framework.Input;
1112
using Intersect.Client.Framework.Items;
1213
using Intersect.Client.General;
@@ -1960,6 +1961,11 @@ public bool TryAttack()
19601961
return false;
19611962
}
19621963

1964+
if (DragAndDrop.IsDragging)
1965+
{
1966+
return false;
1967+
}
1968+
19631969
int x = Globals.Me.X;
19641970
int y = Globals.Me.Y;
19651971
var map = Globals.Me.MapId;

Intersect.Client.Framework/Gwen/DragDrop/DragAndDrop.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ public static partial class DragAndDrop
2727

2828
public static Base SourceControl;
2929

30+
public static bool IsDragging => CurrentPackage != default;
31+
3032
private static bool OnDrop(int x, int y)
3133
{
3234
var success = false;

0 commit comments

Comments
 (0)