fix: Adds throwing weapons (#1107)

This commit is contained in:
Kamron Batman 2022-07-01 17:03:27 -07:00 • committed by GitHub
parent 38686c09b2
commit 7c981b2d10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 443 additions and 160 deletions

View file

@ -48,11 +48,12 @@ namespace Server.Items
public override void OnDoubleClick(Mobile from)
{
if ((_arrows > 0 || _bolts > 0) && from.InRange(GetWorldLocation(), 1))
var inRange = from.InRange(GetWorldLocation(), 1);
if ((_arrows > 0 || _bolts > 0) && inRange)
{
Gather(from);
}
else
else if (from.Weapon is not BaseThrown || inRange)
{
Fire(from);
}