forked from MagicBane/Server
players can use weapon powers again
This commit is contained in:
@@ -297,7 +297,19 @@ public enum CombatManager {
|
||||
TargetedActionMsg cmm = new TargetedActionMsg(attacker, target, (float) damage, attackAnim);
|
||||
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
|
||||
|
||||
long delay = 20 * 100;
|
||||
|
||||
Reference in New Issue
Block a user