mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-02 03:15:52 -04:00
fixed AI dmg bug, fixed crash bug related to stf names
This commit is contained in:
@@ -560,7 +560,7 @@ public class CombatService implements INetworkDispatch {
|
||||
|
||||
float rawDamage = command.getAddedDamage();
|
||||
|
||||
if(command.getPercentFromWeapon() > 0 && weapon != attacker.getSlottedObject("default_weapon")) {
|
||||
if(command.getPercentFromWeapon() > 0) {
|
||||
|
||||
float weaponMinDmg = weapon.getMinDamage();
|
||||
float weaponMaxDmg = weapon.getMaxDamage();
|
||||
@@ -589,23 +589,6 @@ public class CombatService implements INetworkDispatch {
|
||||
|
||||
}
|
||||
|
||||
} else if(command.getPercentFromWeapon() > 0) {
|
||||
|
||||
float weaponMinDmg = 50;
|
||||
float weaponMaxDmg = 100;
|
||||
|
||||
float weaponDmg = new Random().nextInt((int) (weaponMaxDmg - weaponMinDmg + 1)) + weaponMinDmg;
|
||||
weaponDmg *= command.getPercentFromWeapon();
|
||||
rawDamage += weaponDmg;
|
||||
|
||||
if(weapon.isMelee()) {
|
||||
|
||||
if(attacker.getStrength() > 0) {
|
||||
rawDamage += ((attacker.getStrength() / 100) * 33);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
rawDamage *= getWeaponDamageIncrease(attacker, weapon);
|
||||
@@ -656,23 +639,6 @@ public class CombatService implements INetworkDispatch {
|
||||
|
||||
}
|
||||
|
||||
} else if(command.getPercentFromWeapon() > 0) {
|
||||
|
||||
float weaponMinDmg = 50;
|
||||
float weaponMaxDmg = 100;
|
||||
|
||||
float weaponDmg = new Random().nextInt((int) (weaponMaxDmg - weaponMinDmg + 1)) + weaponMinDmg;
|
||||
weaponDmg *= command.getPercentFromWeapon();
|
||||
rawDamage += weaponDmg;
|
||||
|
||||
if(weapon.isMelee()) {
|
||||
|
||||
if(attacker.getStrength() > 0) {
|
||||
rawDamage += ((attacker.getStrength() / 100) * 33);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return rawDamage;
|
||||
|
||||
Reference in New Issue
Block a user