forked from MagicBane/Server
new combat finalized
This commit is contained in:
@@ -764,19 +764,8 @@ public class MobAI {
|
||||
mob.setCombatTarget(null);
|
||||
return;
|
||||
}
|
||||
if (System.currentTimeMillis() > mob.getNextAttackTime()) {
|
||||
int delay = 3000;
|
||||
if (mob.charItemManager.getEquipped().get(mbEnums.EquipSlotType.RHELD) != null) {
|
||||
delay = (int) (mob.charItemManager.getEquipped().get(mbEnums.EquipSlotType.RHELD).template.item_weapon_wepspeed * 100);
|
||||
}
|
||||
if (mob.charItemManager.getEquipped().get(mbEnums.EquipSlotType.LHELD) != null && mob.charItemManager.getEquipped().get(mbEnums.EquipSlotType.LHELD).template.item_type.equals(mbEnums.ItemType.WEAPON)) {
|
||||
delay += (int) (mob.charItemManager.getEquipped().get(mbEnums.EquipSlotType.LHELD).template.item_weapon_wepspeed * 100);
|
||||
}
|
||||
AttackTarget(mob, mob.getCombatTarget());
|
||||
|
||||
|
||||
mob.nextAttackTime = System.currentTimeMillis() + delay;
|
||||
AttackTarget(mob, mob.getCombatTarget());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: CheckForAttack" + " " + e.getMessage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user