swing animation for miss
This commit is contained in:
@@ -289,8 +289,12 @@ public enum CombatManager {
|
||||
|
||||
if (target.getObjectType() == mbEnums.GameObjectType.PlayerCharacter)
|
||||
DispatchManager.dispatchMsgToInterestArea(target, msg, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
//else
|
||||
// DispatchManager.sendToAllInRange(attacker, msg);
|
||||
else
|
||||
DispatchManager.sendToAllInRange(attacker, msg);
|
||||
|
||||
//we need to send the animation even if the attacker misses
|
||||
TargetedActionMsg cmm = new TargetedActionMsg(attacker, target, (float) 0, getSwingAnimation(weapon.template,null,slot));
|
||||
DispatchManager.sendToAllInRange(target, cmm);
|
||||
|
||||
//set auto attack job
|
||||
setAutoAttackJob(attacker, slot, delay);
|
||||
@@ -327,8 +331,6 @@ public enum CombatManager {
|
||||
|
||||
if (target.getObjectType() == mbEnums.GameObjectType.PlayerCharacter)
|
||||
DispatchManager.dispatchMsgToInterestArea(target, msg, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
else
|
||||
DispatchManager.sendToAllInRange(attacker, msg);
|
||||
|
||||
//set auto attack job
|
||||
setAutoAttackJob(attacker, slot, delay);
|
||||
@@ -434,9 +436,9 @@ public enum CombatManager {
|
||||
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);
|
||||
attackAnim = getSwingAnimation(weapon.template, weaponPower, slot);
|
||||
} else {
|
||||
attackAnim = getSwingAnimation(attacker.charItemManager.getEquipped().get(slot).template, null, slot);
|
||||
attackAnim = getSwingAnimation(weapon.template, null, slot);
|
||||
}
|
||||
}
|
||||
TargetedActionMsg cmm = new TargetedActionMsg(attacker, target, (float) damage, attackAnim);
|
||||
|
||||
Reference in New Issue
Block a user