fix: Fixes drag drop bounce issue (#1040)

This commit is contained in:
Kamron Batman 2022-05-30 15:47:06 -07:00 committed by GitHub
parent aeec7f78fd
commit 98a74a89c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 23 deletions

View file

@ -2074,9 +2074,12 @@ namespace Server
MoveToWorld(from.Location, from.Map);
}
}
else if ((parent as Mobile)?.EquipItem(this) == false)
else if (parent is Mobile mobile)
{
MoveToWorld(bounce.WorldLoc, bounce.Map);
if (!mobile.EquipItem(this))
{
MoveToWorld(bounce.WorldLoc, bounce.Map);
}
}
else
{