Browse Source

random animation for weapon powers

combat-2
FatBoy-DOTC 8 months ago
parent
commit
1911de0757
  1. 5
      src/engine/gameManager/CombatManager.java

5
src/engine/gameManager/CombatManager.java

@ -404,8 +404,13 @@ public enum CombatManager { @@ -404,8 +404,13 @@ public enum CombatManager {
int attackAnim = getSwingAnimation(null, null, slot.equals(mbEnums.EquipSlotType.RHELD));
if (attacker.charItemManager.getEquipped().get(slot) != null) {
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);
}

Loading…
Cancel
Save