|
|
@ -104,6 +104,16 @@ public enum CombatManager { |
|
|
|
|
|
|
|
|
|
|
|
public static void processAttack(AbstractCharacter attacker, AbstractWorldObject target, mbEnums.EquipSlotType slot) { |
|
|
|
public static void processAttack(AbstractCharacter attacker, AbstractWorldObject target, mbEnums.EquipSlotType slot) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(attacker.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) { |
|
|
|
|
|
|
|
if (!attacker.isCombat()) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (attacker.getTimestamps().get("Attack" + slot.name()) != null && attacker.getTimestamps().get("Attack" + slot.name()) < System.currentTimeMillis()) { |
|
|
|
|
|
|
|
setAutoAttackJob(attacker, slot, 1000); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// check if character is in range to attack target
|
|
|
|
// check if character is in range to attack target
|
|
|
|
|
|
|
|
|
|
|
|
PlayerBonuses bonus = attacker.getBonuses(); |
|
|
|
PlayerBonuses bonus = attacker.getBonuses(); |
|
|
|