Browse Source

attack speed pulled from cached value

combat-3
FatBoy-DOTC 7 months ago
parent
commit
b22c07b000
  1. 26
      src/engine/gameManager/CombatManager.java

26
src/engine/gameManager/CombatManager.java

@ -196,20 +196,28 @@ public enum CombatManager {
//get delay for the auto attack job //get delay for the auto attack job
long delay = 5000; long delay = 5000;
if (weapon != null) { //if (weapon != null) {
// int wepSpeed = (int) (weapon.template.item_weapon_wepspeed);
int wepSpeed = (int) (weapon.template.item_weapon_wepspeed); // if (weapon.getBonusPercent(mbEnums.ModType.WeaponSpeed, mbEnums.SourceType.None) != 0f) //add weapon speed bonus
// wepSpeed *= (1 + weapon.getBonus(mbEnums.ModType.WeaponSpeed, mbEnums.SourceType.None));
if (weapon.getBonusPercent(mbEnums.ModType.WeaponSpeed, mbEnums.SourceType.None) != 0f) //add weapon speed bonus // if (attacker.getBonuses() != null && attacker.getBonuses().getFloatPercentAll(mbEnums.ModType.AttackDelay, mbEnums.SourceType.None) != 0f) //add effects speed bonus
wepSpeed *= (1 + weapon.getBonus(mbEnums.ModType.WeaponSpeed, mbEnums.SourceType.None)); // wepSpeed *= (1 + attacker.getBonuses().getFloatPercentAll(mbEnums.ModType.AttackDelay, mbEnums.SourceType.None));
if (attacker.getBonuses() != null && attacker.getBonuses().getFloatPercentAll(mbEnums.ModType.AttackDelay, mbEnums.SourceType.None) != 0f) //add effects speed bonus // if (wepSpeed < 10)
wepSpeed *= (1 + attacker.getBonuses().getFloatPercentAll(mbEnums.ModType.AttackDelay, mbEnums.SourceType.None)); // wepSpeed = 10; //Old was 10, but it can be reached lower with legit buffs,effects.
if (wepSpeed < 10) // delay = wepSpeed * 100L;
wepSpeed = 10; //Old was 10, but it can be reached lower with legit buffs,effects. //}
delay = wepSpeed * 100L; if(attacker.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)){
if(slot.equals(mbEnums.EquipSlotType.RHELD)){
delay = (long)(attacker.speedHandOne * 100L);
}else{
delay = (long)(attacker.speedHandTwo * 100L);
}
} }
if (attacker.getObjectType().equals(mbEnums.GameObjectType.Mob)) if (attacker.getObjectType().equals(mbEnums.GameObjectType.Mob))

Loading…
Cancel
Save