|
|
|
@ -168,12 +168,12 @@ public enum CombatManager {
@@ -168,12 +168,12 @@ public enum CombatManager {
|
|
|
|
|
switch (target.getObjectType()) { |
|
|
|
|
case PlayerCharacter: |
|
|
|
|
attackRange += ((PlayerCharacter) target).getCharacterHeight() * 0.5f; |
|
|
|
|
if (distanceSquared < attackRange * attackRange) |
|
|
|
|
if (distanceSquared <= attackRange * attackRange) |
|
|
|
|
inRange = true; |
|
|
|
|
break; |
|
|
|
|
case Mob: |
|
|
|
|
attackRange += ((AbstractCharacter) target).calcHitBox(); |
|
|
|
|
if (distanceSquared < attackRange * attackRange) |
|
|
|
|
if (distanceSquared <= attackRange * attackRange) |
|
|
|
|
inRange = true; |
|
|
|
|
break; |
|
|
|
|
case Building: |
|
|
|
@ -201,7 +201,7 @@ public enum CombatManager {
@@ -201,7 +201,7 @@ public enum CombatManager {
|
|
|
|
|
|
|
|
|
|
if (weapon != null) { |
|
|
|
|
|
|
|
|
|
int wepSpeed = (int) (weapon.template.item_weapon_wepspeed); |
|
|
|
|
float wepSpeed = (int) (weapon.template.item_weapon_wepspeed); |
|
|
|
|
|
|
|
|
|
if (weapon.getBonusPercent(mbEnums.ModType.WeaponSpeed, mbEnums.SourceType.None) != 0f) //add weapon speed bonus
|
|
|
|
|
wepSpeed *= (1 + weapon.getBonus(mbEnums.ModType.WeaponSpeed, mbEnums.SourceType.None)); |
|
|
|
@ -212,7 +212,7 @@ public enum CombatManager {
@@ -212,7 +212,7 @@ public enum CombatManager {
|
|
|
|
|
if (wepSpeed < 10) |
|
|
|
|
wepSpeed = 10; //Old was 10, but it can be reached lower with legit buffs,effects.
|
|
|
|
|
|
|
|
|
|
delay = wepSpeed * 100L; |
|
|
|
|
delay = (long)wepSpeed * 100L; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (attacker.getObjectType().equals(mbEnums.GameObjectType.Mob)) |
|
|
|
|