Workaround for missing ranged weapon reuse delays.

This commit is contained in:
MobiusDevelopment
2023-01-04 22:33:51 +00:00
parent 346f8241a2
commit 5adebb658e
61 changed files with 218 additions and 29 deletions

View File

@@ -143,7 +143,7 @@ public abstract class ItemTemplate extends ListenersContainer implements IIdenti
private SkillHolder _unequipSkill = null;
private int _useSkillDisTime;
private int _reuseDelay;
protected int _reuseDelay;
private int _sharedReuseGroup;
/**

View File

@@ -195,6 +195,12 @@ public class Weapon extends ItemTemplate
_isForceEquip = set.getBoolean("isForceEquip", false);
_isAttackWeapon = set.getBoolean("isAttackWeapon", true);
_useWeaponSkillsOnly = set.getBoolean("useWeaponSkillsOnly", false);
// Check if ranged weapon reuse delay is missing.
if ((_reuseDelay == 0) && _type.isRanged())
{
_reuseDelay = 1500;
}
}
/**

View File

@@ -68,4 +68,9 @@ public enum WeaponType implements ItemType
{
return _traitType;
}
public boolean isRanged()
{
return (this == BOW);
}
}