protected boolean checkAndEquipAmmunition(EtcItemType type)
{
// Item ammunition = null;
Item ammunition = _inventory.getPaperdollItem(Inventory.PAPERDOLL_CLOAK);
if (ammunition == null)
{
final Weapon weapon = getActiveWeaponItem();
if (type == EtcItemType.ARROW)
{
ammunition = _inventory.findArrowForBow(weapon);
}
else if (type == EtcItemType.BOLT)
{
ammunition = _inventory.findBoltForCrossBow(weapon);
}
if (ammunition != null)
{
addAmmunitionSkills(ammunition);
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(ammunition);
sendInventoryUpdate(iu);
return true;
}
}
else
{
return true;
}
removeAmmunitionSkills();
return false;
}