From a84c712110286dc6503537ce2dbcdad41bdf901b Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 21 Apr 2024 11:52:47 -0500 Subject: [PATCH] random animation for weapon powers --- src/engine/gameManager/CombatManager.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/engine/gameManager/CombatManager.java b/src/engine/gameManager/CombatManager.java index 7a89ef59..1bd981dd 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -481,10 +481,12 @@ public enum CombatManager { if (token == 563721004) //kick animation return 79; - if(mainHand && wb != null){ - return wb.weapon_attack_anim_right.get(ThreadLocalRandom.current().nextInt(wb.weapon_attack_anim_right.size()))[0]; - } else{ - return wb.weapon_attack_anim_left.get(ThreadLocalRandom.current().nextInt(wb.weapon_attack_anim_left.size()))[0]; + if(wb != null) { + if (mainHand) { + return wb.weapon_attack_anim_right.get(ThreadLocalRandom.current().nextInt(wb.weapon_attack_anim_right.size()))[0]; + } else { + return wb.weapon_attack_anim_left.get(ThreadLocalRandom.current().nextInt(wb.weapon_attack_anim_left.size()))[0]; + } } }