Skip to content

Commit

Permalink
Applying changes from personal review
Browse files Browse the repository at this point in the history
  • Loading branch information
Windchild292 committed May 5, 2021
1 parent 9a514f1 commit e847e4d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions MekHQ/src/mekhq/campaign/personnel/Person.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/
package mekhq.campaign.personnel;

import megamek.MegaMek;
import megamek.client.generator.RandomNameGenerator;
import megamek.common.Aero;
import megamek.common.BattleArmor;
Expand Down Expand Up @@ -2345,14 +2344,12 @@ public int getExperienceLevel(boolean secondary) {
if (campaign.getCampaignOptions().useAlternativeQualityAveraging()) {
int rawScore = (int) Math.floor((Stream.of(SkillType.S_GUN_MECH, SkillType.S_PILOT_MECH,
SkillType.S_GUN_AERO, SkillType.S_PILOT_AERO).mapToInt(s -> getSkill(s).getLevel()).sum())
/ 4.0
);
/ 4.0);

final int mechGunneryExperienceLevel = SkillType.lookupHash.get(SkillType.S_GUN_MECH).getExperienceLevel(rawScore);
if ((mechGunneryExperienceLevel == SkillType.lookupHash.get(SkillType.S_PILOT_MECH).getExperienceLevel(rawScore)
&& (mechGunneryExperienceLevel == SkillType.lookupHash.get(SkillType.S_GUN_AERO).getExperienceLevel(rawScore))
&& (mechGunneryExperienceLevel == SkillType.lookupHash.get(SkillType.S_PILOT_AERO).getExperienceLevel(rawScore)))
) {
&& (mechGunneryExperienceLevel == SkillType.lookupHash.get(SkillType.S_PILOT_AERO).getExperienceLevel(rawScore)))) {
return getSkill(SkillType.S_GUN_MECH).getType().getExperienceLevel(rawScore);
}
}
Expand Down

0 comments on commit e847e4d

Please sign in to comment.