Fixed BOW attack type NPCs being unable to attack.

Contributed by Sahar.
This commit is contained in:
MobiusDevelopment 2019-09-27 21:12:44 +00:00
parent 532202c8ed
commit 6dbaf35e86

View File

@ -768,15 +768,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
{
return true;
}
final Weapon weaponItem = getActiveWeaponItem();
if ((weaponItem == null) || !weaponItem.isRange())
{
return false;
}
// Check for arrows and MP
if (isPlayer())
{
final Weapon weaponItem = getActiveWeaponItem();
if ((weaponItem == null) || !weaponItem.isRange())
{
return false;
}
// Equip arrows needed in left hand and send a Server->Client packet ItemList to the PlayerInstance then return True
if (!checkAndEquipArrows())
{