diff --git a/core/package-lock.json b/core/package-lock.json index 0ee861dad7..9ddc99e343 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -2178,9 +2178,9 @@ } }, "@firestone-hs/trigger-process-mercenaries-review": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@firestone-hs/trigger-process-mercenaries-review/-/trigger-process-mercenaries-review-1.0.3.tgz", - "integrity": "sha512-32EELJllp/L6oYg6H9GN/YmmBw71Ca6Vy89bpu+fqddnS+SOG4NkMhZSFa6/EwiBsH4hUxpzDuFXPQ09beKoZA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@firestone-hs/trigger-process-mercenaries-review/-/trigger-process-mercenaries-review-1.0.4.tgz", + "integrity": "sha512-AhjMleOscgs+xIGvDKxa15cBePHSlGfv84x1QWl1sfgjVr+iPThQzPjMtQWNaz2r7pgMdIXJcTQNSZ/30ImJ0w==", "requires": { "@firestone-hs/build-global-stats": "^1.0.3", "@firestone-hs/hs-replay-xml-parser": "0.0.85", @@ -2203,9 +2203,9 @@ }, "dependencies": { "aws-sdk": { - "version": "2.1006.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1006.0.tgz", - "integrity": "sha512-lwXAy706+1HVQqMnHaahdeBZZbdu6TWrtTY0ydeG0qanwldTFNMLczwnETTZWYsqNAU+wjl1VzmFdMO4gePLNQ==", + "version": "2.1007.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1007.0.tgz", + "integrity": "sha512-I/o2R7RTh6NGRilsBrJHg7r9WprU9EavozZ43qMQcppaLAeZrECBbGfpfRyhfrj7885+KS+WOu1SGn6bsSd2VQ==", "requires": { "buffer": "4.9.2", "events": "1.1.1", @@ -2856,7 +2856,8 @@ }, "ansi-regex": { "version": "5.0.0", - "resolved": "", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, "ansi-styles": { @@ -9892,7 +9893,8 @@ }, "ansi-regex": { "version": "5.0.0", - "resolved": "", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, "ansi-styles": { @@ -11969,7 +11971,8 @@ }, "ansi-regex": { "version": "5.0.0", - "resolved": "", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, "ansi-styles": { @@ -18793,7 +18796,8 @@ "dependencies": { "ansi-regex": { "version": "5.0.0", - "resolved": "" + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" }, "emoji-regex": { "version": "8.0.0", @@ -18891,7 +18895,8 @@ "dependencies": { "ansi-regex": { "version": "5.0.0", - "resolved": "", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, "ansi-styles": { diff --git a/core/package.json b/core/package.json index b288fc253f..b31ce4d9f6 100644 --- a/core/package.json +++ b/core/package.json @@ -45,7 +45,7 @@ "@firestone-hs/retrieve-users-duels-runs": "^1.0.3", "@firestone-hs/save-dungeon-loot-info": "^1.0.8", "@firestone-hs/simulate-bgs-battle": "^1.1.120", - "@firestone-hs/trigger-process-mercenaries-review": "^1.0.3", + "@firestone-hs/trigger-process-mercenaries-review": "^1.0.4", "@firestone-hs/user-bgs-post-match-stats": "^1.0.3", "@ng-select/ng-select": "^6.1.0", "@sebastientromp/ngx-charts": "^19.0.5", diff --git a/core/src/js/components/mercenaries/overlay/teams/mercenaries-team-mercenary.component.ts b/core/src/js/components/mercenaries/overlay/teams/mercenaries-team-mercenary.component.ts index 2a3bb7648d..be71a44f0a 100644 --- a/core/src/js/components/mercenaries/overlay/teams/mercenaries-team-mercenary.component.ts +++ b/core/src/js/components/mercenaries/overlay/teams/mercenaries-team-mercenary.component.ts @@ -17,7 +17,7 @@ import { CardsFacadeService } from '../../../../services/cards-facade.service';
{{ name }} - ({{ level }}) + ({{ level }})
{ }; export const getMercLevelFromExperience = (totalXp: number, referenceData: MercenariesReferenceData): number => { - if (totalXp <= 0) { - return null; - } - - let currentLevel = 1; - let xpToAttribute = totalXp; + let currentLevel = 0; for (const levelMapping of referenceData.mercenaryLevels) { - if (xpToAttribute < levelMapping.xpToNext) { + if (levelMapping.xpToNext > totalXp) { break; } currentLevel++; - xpToAttribute -= levelMapping.xpToNext; } - return currentLevel; };