swing animation lookup
This commit is contained in:
@@ -260,12 +260,16 @@ public enum CombatManager {
|
|||||||
|
|
||||||
if (target.getObjectType() == mbEnums.GameObjectType.Building)
|
if (target.getObjectType() == mbEnums.GameObjectType.Building)
|
||||||
hitChance = 100;
|
hitChance = 100;
|
||||||
|
|
||||||
int passiveAnim = getSwingAnimation(null, null, slot.equals(mbEnums.EquipSlotType.RHELD));
|
int passiveAnim = getSwingAnimation(null, null, slot.equals(mbEnums.EquipSlotType.RHELD));
|
||||||
if (attacker.charItemManager.getEquipped().get(slot) != null) {
|
if(attacker.getObjectType().equals(mbEnums.GameObjectType.Mob)){
|
||||||
passiveAnim = getSwingAnimation(weapon.template, null, true);
|
if (weapon != null) {
|
||||||
|
passiveAnim = getSwingAnimation(weapon.template, null, true);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if (attacker.charItemManager.getEquipped().get(slot) != null) {
|
||||||
|
passiveAnim = getSwingAnimation(attacker.charItemManager.getEquipped().get(slot).template, null, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ThreadLocalRandom.current().nextInt(100) > hitChance) {
|
if (ThreadLocalRandom.current().nextInt(100) > hitChance) {
|
||||||
TargetedActionMsg msg = new TargetedActionMsg(attacker, target, 0f, passiveAnim);
|
TargetedActionMsg msg = new TargetedActionMsg(attacker, target, 0f, passiveAnim);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user