|
|
@ -297,7 +297,19 @@ public enum CombatManager { |
|
|
|
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); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
DeferredPowerJob dpj = null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (attacker.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dpj = ((PlayerCharacter) attacker).getWeaponPower(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (dpj != null) { |
|
|
|
|
|
|
|
dpj.attack(target, attackRange); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (dpj.getPower() != null && (dpj.getPowerToken() == -1851459567 || dpj.getPowerToken() == -1851489518)) |
|
|
|
|
|
|
|
((PlayerCharacter) attacker).setWeaponPower(dpj); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
//calculate next allowed attack and update the timestamp
|
|
|
|
//calculate next allowed attack and update the timestamp
|
|
|
|
|
|
|
|
|
|
|
|
long delay = 20 * 100; |
|
|
|
long delay = 20 * 100; |
|
|
|