From b22c07b000dd088583a7b0b9dad09a40567b21c7 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Mon, 3 Jun 2024 20:44:29 -0500 Subject: [PATCH] attack speed pulled from cached value --- src/engine/gameManager/CombatManager.java | 26 +++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/engine/gameManager/CombatManager.java b/src/engine/gameManager/CombatManager.java index 15daeace..fceb317f 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -196,20 +196,28 @@ public enum CombatManager { //get delay for the auto attack job 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 - wepSpeed *= (1 + weapon.getBonus(mbEnums.ModType.WeaponSpeed, mbEnums.SourceType.None)); + // if (attacker.getBonuses() != null && attacker.getBonuses().getFloatPercentAll(mbEnums.ModType.AttackDelay, mbEnums.SourceType.None) != 0f) //add effects speed bonus + // 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 - wepSpeed *= (1 + attacker.getBonuses().getFloatPercentAll(mbEnums.ModType.AttackDelay, mbEnums.SourceType.None)); + // if (wepSpeed < 10) + // wepSpeed = 10; //Old was 10, but it can be reached lower with legit buffs,effects. - if (wepSpeed < 10) - wepSpeed = 10; //Old was 10, but it can be reached lower with legit buffs,effects. + // delay = wepSpeed * 100L; + //} - 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))