mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-18 22:36:27 +01:00
Update BadgePointLimit
This commit is contained in:
parent
e02084db71
commit
228c258aab
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user