From 1911de0757aad3e6e68eba12dab7571f25700b40 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 21 Apr 2024 12:21:34 -0500 Subject: [PATCH] random animation for weapon powers --- src/engine/gameManager/CombatManager.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/engine/gameManager/CombatManager.java b/src/engine/gameManager/CombatManager.java index a932179d..fd706471 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -404,7 +404,12 @@ public enum CombatManager { int attackAnim = getSwingAnimation(null, null, slot.equals(mbEnums.EquipSlotType.RHELD)); if (attacker.charItemManager.getEquipped().get(slot) != null) { - attackAnim = getSwingAnimation(attacker.charItemManager.getEquipped().get(slot).template, null, slot.equals(mbEnums.EquipSlotType.RHELD)); + if(attacker.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { + DeferredPowerJob weaponPower = ((PlayerCharacter) attacker).getWeaponPower(); + attackAnim = getSwingAnimation(attacker.charItemManager.getEquipped().get(slot).template, weaponPower, slot.equals(mbEnums.EquipSlotType.RHELD)); + }else { + attackAnim = getSwingAnimation(attacker.charItemManager.getEquipped().get(slot).template, null, slot.equals(mbEnums.EquipSlotType.RHELD)); + } } TargetedActionMsg cmm = new TargetedActionMsg(attacker, target, (float) damage, attackAnim); DispatchMessage.sendToAllInRange(target, cmm);