|
|
@ -118,12 +118,15 @@ public enum CombatManager { |
|
|
|
if (!attacker.isCombat()) |
|
|
|
if (!attacker.isCombat()) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
if (attacker.getTimestamps().get("Attack" + slot.name()) != null && attacker.getTimestamps().get("Attack" + slot.name()) < System.currentTimeMillis()) { |
|
|
|
//check if this slot is on attack timer, if timer has passed clear it, else early exit
|
|
|
|
setAutoAttackJob(attacker, slot, 1000); |
|
|
|
if(attacker.getTimers().containsKey("Attack"+slot.name())) |
|
|
|
return; |
|
|
|
if(attacker.getTimers().get("Attack"+slot.name()).timeToExecutionLeft() <= 0) |
|
|
|
} |
|
|
|
attacker.getTimers().remove("Attack"+slot.name()); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
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(); |
|
|
@ -285,8 +288,8 @@ public enum CombatManager { |
|
|
|
|
|
|
|
|
|
|
|
if (target.getObjectType() == mbEnums.GameObjectType.PlayerCharacter) |
|
|
|
if (target.getObjectType() == mbEnums.GameObjectType.PlayerCharacter) |
|
|
|
DispatchManager.dispatchMsgToInterestArea(target, msg, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); |
|
|
|
DispatchManager.dispatchMsgToInterestArea(target, msg, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); |
|
|
|
else |
|
|
|
//else
|
|
|
|
DispatchManager.sendToAllInRange(attacker, msg); |
|
|
|
// DispatchManager.sendToAllInRange(attacker, msg);
|
|
|
|
|
|
|
|
|
|
|
|
//set auto attack job
|
|
|
|
//set auto attack job
|
|
|
|
setAutoAttackJob(attacker, slot, delay); |
|
|
|
setAutoAttackJob(attacker, slot, delay); |
|
|
|