PlayerCombatStats dex penalty applied correctly
This commit is contained in:
@@ -52,10 +52,10 @@ public class dbItemBaseHandler extends dbHandlerBase {
|
||||
|
||||
preparedStatement.setInt(1, itemBase.getUUID());
|
||||
ResultSet rs = preparedStatement.executeQuery();
|
||||
try {
|
||||
|
||||
// Check if a result was found
|
||||
if (rs.next()) {
|
||||
itemBase.dexReduction = rs.getFloat("item_bulk_factor");
|
||||
}catch(Exception e){
|
||||
Logger.error("No Value Found For Dex Penalty FOr Item: " + itemBase.getUUID());
|
||||
}
|
||||
|
||||
} catch (SQLException e) {
|
||||
|
||||
@@ -687,7 +687,7 @@ public class PlayerCombatStats {
|
||||
if(penaltyFactor > 0)
|
||||
penaltyFactor *= 0.01f;
|
||||
|
||||
float totalPenalty = dex * (1 + penaltyFactor);
|
||||
float totalPenalty = dex * penaltyFactor;
|
||||
|
||||
return Math.round(dex - totalPenalty);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user