-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix AtBMonthlyContractMarket payment multiplier #4954
Fix AtBMonthlyContractMarket payment multiplier #4954
Conversation
* | ||
* @return The unit rating modifier as described in Campaign Operations. | ||
*/ | ||
public int getCamOpsUnitRatingMod() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there value in moving this into the Reputation class - cooking dinner so the class might be called something else? Call the new method something like getReputationModifier()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did actually try to do that first, but there is already a different getReputationModifier() there that does something based on the unit experience levels instead. I wasn't sure how that was used and so I didn't want to mess with it--could you look at that when you get a minute and let me know what you think?
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ll take a look once I’ve had dinner.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4954 +/- ##
============================================
+ Coverage 10.44% 10.45% +0.01%
- Complexity 6005 6016 +11
============================================
Files 951 951
Lines 132875 132876 +1
Branches 19329 19329
============================================
+ Hits 13876 13894 +18
+ Misses 117648 117632 -16
+ Partials 1351 1350 -1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for the review, this should be fixed. I'm working on tests but that will likely take some more time/refactoring so I'll push those in a separate PR later. |
There was an error when calculating the payment multiplier using the CamOps unit rating method for AtBMonthly contracts, which was caused by incorrectly using the reputation score instead of the reputation modifier for determining this multiplier. This PR does a couple of things:
getReputationFactor()
to use the camopsUnitRatingMod instead of the reputation scoreAtBMonthlyContractMarket
and uses theAtBUnitRatingMod
insteadgetCamOpsUnitRatingMod()
method to get the camops unit rating mod and supportgetReputationFactor()
Closes #4952