forked from MagicBane/Server
random animation for weapon powers
This commit is contained in:
@@ -404,7 +404,12 @@ public enum CombatManager {
|
|||||||
|
|
||||||
int attackAnim = getSwingAnimation(null, null, slot.equals(mbEnums.EquipSlotType.RHELD));
|
int attackAnim = getSwingAnimation(null, null, slot.equals(mbEnums.EquipSlotType.RHELD));
|
||||||
if (attacker.charItemManager.getEquipped().get(slot) != null) {
|
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);
|
TargetedActionMsg cmm = new TargetedActionMsg(attacker, target, (float) damage, attackAnim);
|
||||||
DispatchMessage.sendToAllInRange(target, cmm);
|
DispatchMessage.sendToAllInRange(target, cmm);
|
||||||
|
|||||||
Reference in New Issue
Block a user