Update BadgePointLimit

This commit is contained in:
Bill 2021-09-06 02:54:54 -04:00
parent e02084db71
commit 228c258aab
2 changed files with 6 additions and 2 deletions

View File

@ -11,5 +11,6 @@ export interface INitroLocalizationManager extends INitroManager
registerParameter(key: string, parameter: string, value: string): void;
getBadgeName(key: string): string;
getBadgeDesc(key: string): string;
getBadgePointLimit(badge: string): number;
setBadgePointLimit(badge: string, point: number): void;
}

View File

@ -88,7 +88,7 @@ export class NitroLocalizationManager extends NitroManager implements INitroLoca
public getBadgePointLimit(badge: string): number
{
return this._badgePointLimits.get(badge);
return (this._badgePointLimits.get(badge) || -1);
}
public setBadgePointLimit(badge: string, point: number): void
@ -289,7 +289,10 @@ export class NitroLocalizationManager extends NitroManager implements INitroLoca
let desc = this._Str_2103(this.getExistingKey(keys));
desc = desc.replace('%limit$', this.getBadgePointLimit(key).toString());
const limit = this.getBadgePointLimit(key);
if(limit > -1) desc = desc.replace('%limit%', limit.toString());
desc = desc.replace('%roman%', this.getRomanNumeral(badge.level));
return desc;