Use previous attack speed delay for ranged weapons.

This commit is contained in:
MobiusDevelopment 2019-05-09 23:15:17 +00:00
parent 3d9011a87d
commit 7b6e57b1aa
12 changed files with 24 additions and 24 deletions

View File

@ -1092,9 +1092,9 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
case BOW: case BOW:
{ {
// Old method. // Old method.
// final int reuse = Formulas.calculateReuseTime(this, weaponItem); final int reuse = Formulas.calculateReuseTime(this, weaponItem);
// Try to do what is expected by having more attack speed. // Try to do what is expected by having more attack speed.
final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1))); // final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1)));
// Consume arrows // Consume arrows
final Inventory inventory = getInventory(); final Inventory inventory = getInventory();

View File

@ -1092,9 +1092,9 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
case BOW: case BOW:
{ {
// Old method. // Old method.
// final int reuse = Formulas.calculateReuseTime(this, weaponItem); final int reuse = Formulas.calculateReuseTime(this, weaponItem);
// Try to do what is expected by having more attack speed. // Try to do what is expected by having more attack speed.
final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1))); // final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1)));
// Consume arrows // Consume arrows
final Inventory inventory = getInventory(); final Inventory inventory = getInventory();

View File

@ -1092,9 +1092,9 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
case BOW: case BOW:
{ {
// Old method. // Old method.
// final int reuse = Formulas.calculateReuseTime(this, weaponItem); final int reuse = Formulas.calculateReuseTime(this, weaponItem);
// Try to do what is expected by having more attack speed. // Try to do what is expected by having more attack speed.
final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1))); // final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1)));
// Consume arrows // Consume arrows
final Inventory inventory = getInventory(); final Inventory inventory = getInventory();

View File

@ -1092,9 +1092,9 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
case BOW: case BOW:
{ {
// Old method. // Old method.
// final int reuse = Formulas.calculateReuseTime(this, weaponItem); final int reuse = Formulas.calculateReuseTime(this, weaponItem);
// Try to do what is expected by having more attack speed. // Try to do what is expected by having more attack speed.
final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1))); // final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1)));
// Consume arrows // Consume arrows
final Inventory inventory = getInventory(); final Inventory inventory = getInventory();

View File

@ -1092,9 +1092,9 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
case BOW: case BOW:
{ {
// Old method. // Old method.
// final int reuse = Formulas.calculateReuseTime(this, weaponItem); final int reuse = Formulas.calculateReuseTime(this, weaponItem);
// Try to do what is expected by having more attack speed. // Try to do what is expected by having more attack speed.
final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1))); // final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1)));
// Consume arrows // Consume arrows
final Inventory inventory = getInventory(); final Inventory inventory = getInventory();

View File

@ -1092,9 +1092,9 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
case BOW: case BOW:
{ {
// Old method. // Old method.
// final int reuse = Formulas.calculateReuseTime(this, weaponItem); final int reuse = Formulas.calculateReuseTime(this, weaponItem);
// Try to do what is expected by having more attack speed. // Try to do what is expected by having more attack speed.
final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1))); // final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1)));
// Consume arrows // Consume arrows
final Inventory inventory = getInventory(); final Inventory inventory = getInventory();

View File

@ -1092,9 +1092,9 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
case BOW: case BOW:
{ {
// Old method. // Old method.
// final int reuse = Formulas.calculateReuseTime(this, weaponItem); final int reuse = Formulas.calculateReuseTime(this, weaponItem);
// Try to do what is expected by having more attack speed. // Try to do what is expected by having more attack speed.
final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1))); // final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1)));
// Consume arrows // Consume arrows
final Inventory inventory = getInventory(); final Inventory inventory = getInventory();

View File

@ -1092,9 +1092,9 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
case BOW: case BOW:
{ {
// Old method. // Old method.
// final int reuse = Formulas.calculateReuseTime(this, weaponItem); final int reuse = Formulas.calculateReuseTime(this, weaponItem);
// Try to do what is expected by having more attack speed. // Try to do what is expected by having more attack speed.
final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1))); // final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1)));
// Consume arrows // Consume arrows
final Inventory inventory = getInventory(); final Inventory inventory = getInventory();

View File

@ -1092,9 +1092,9 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
case BOW: case BOW:
{ {
// Old method. // Old method.
// final int reuse = Formulas.calculateReuseTime(this, weaponItem); final int reuse = Formulas.calculateReuseTime(this, weaponItem);
// Try to do what is expected by having more attack speed. // Try to do what is expected by having more attack speed.
final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1))); // final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1)));
// Consume arrows // Consume arrows
final Inventory inventory = getInventory(); final Inventory inventory = getInventory();

View File

@ -1092,9 +1092,9 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
case BOW: case BOW:
{ {
// Old method. // Old method.
// final int reuse = Formulas.calculateReuseTime(this, weaponItem); final int reuse = Formulas.calculateReuseTime(this, weaponItem);
// Try to do what is expected by having more attack speed. // Try to do what is expected by having more attack speed.
final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1))); // final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1)));
// Consume arrows // Consume arrows
final Inventory inventory = getInventory(); final Inventory inventory = getInventory();

View File

@ -1092,9 +1092,9 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
case BOW: case BOW:
{ {
// Old method. // Old method.
// final int reuse = Formulas.calculateReuseTime(this, weaponItem); final int reuse = Formulas.calculateReuseTime(this, weaponItem);
// Try to do what is expected by having more attack speed. // Try to do what is expected by having more attack speed.
final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1))); // final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1)));
// Consume arrows // Consume arrows
final Inventory inventory = getInventory(); final Inventory inventory = getInventory();

View File

@ -1092,9 +1092,9 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
case BOW: case BOW:
{ {
// Old method. // Old method.
// final int reuse = Formulas.calculateReuseTime(this, weaponItem); final int reuse = Formulas.calculateReuseTime(this, weaponItem);
// Try to do what is expected by having more attack speed. // Try to do what is expected by having more attack speed.
final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1))); // final int reuse = (int) (Formulas.calculateReuseTime(this, weaponItem) / (Math.max(1, _stat.getAttackSpeedMultiplier() - 1)));
// Consume arrows // Consume arrows
final Inventory inventory = getInventory(); final Inventory inventory = getInventory();