Skip to content

Commit

Permalink
ho-dev#1856 fix currency of secondary teams
Browse files Browse the repository at this point in the history
  • Loading branch information
wsbrenk committed Apr 26, 2023
1 parent f916741 commit f63413e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ test {
// Development_stage (DEV:0 BETA:1 STABLE:2)
def major = '7'
def minor = '1'
def development_stage = 0
def development_stage = 1
def releaseArtefacts = true
def development_tag = ["dev", "beta", "tag_stable"]
def version_type = ["-DEV", "-BETA", ""]
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/core/file/xml/ConvertXml2Hrf.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@ private ConvertXml2Hrf() {
if ( lastPremierId != null && lastPremierId == usersPremierTeamId ){
//if (ModuleConfig.instance().containsKey("CurrencyRate")) {
worldDataMap.put("CurrencyRate", ModuleConfig.instance().getString("CurrencyRate"));
worldDataMap.put("CountryId", ModuleConfig.instance().getString("CountryId"));
worldDataMap.put("CountryID", ModuleConfig.instance().getString("CountryId"));
} else {
// We need to get hold of the currency info for the primary team, no matter which team we download.
usersPremierTeamInfo = XMLWorldDetailsParser.updateTeamInfoWithCurrency(usersPremierTeamInfo, mc.getWorldDetails(usersPremierTeamInfo.getLeagueId()));
ModuleConfig.instance().setString("CurrencyRate", usersPremierTeamInfo.getCurrencyRate().trim());
ModuleConfig.instance().setString("CountryId", usersPremierTeamInfo.getCountryId());
ModuleConfig.instance().setInteger("UsersPremierTeamId", usersPremierTeamInfo.getTeamId());
worldDataMap.put("CurrencyRate", ModuleConfig.instance().getString("CurrencyRate"));
worldDataMap.put("CountryId", ModuleConfig.instance().getString("CountryId"));
worldDataMap.put("CountryID", ModuleConfig.instance().getString("CountryId"));
}

HOMainFrame.instance().setInformation(Helper.getTranslation("ls.update_status.players_information"), progressIncrement);
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/core/model/XtraData.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ public class XtraData extends AbstractTable.Storable {
private HODateTime m_TrainingDate;
private boolean m_bHasPromoted;
private double m_dCurrencyRate = -1.0d;

/**
* Id of the user's premier team
* (same currency with all teams of the user)
*/
private Integer m_iCountryId;

/**
Expand Down

0 comments on commit f63413e

Please sign in to comment.