Fixed issue with getPmcConversionMinMaxForLocation()

This commit is contained in:
Dev 2024-09-23 10:45:25 +01:00
parent 10c436cd7d
commit 4cb901d592

View File

@ -450,10 +450,10 @@ export class BotController {
return [desiredBot]; return [desiredBot];
} }
protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string) { protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax {
const mapSpecificConversionValues = this.pmcConfig.convertIntoPmcChance[location?.toLowerCase()]; const mapSpecificConversionValues = this.pmcConfig.convertIntoPmcChance[location?.toLowerCase()];
if (!mapSpecificConversionValues) { if (!mapSpecificConversionValues) {
return this.pmcConfig.convertIntoPmcChance.default; return this.pmcConfig.convertIntoPmcChance.default[requestedBotRole];
} }
return mapSpecificConversionValues[requestedBotRole?.toLowerCase()]; return mapSpecificConversionValues[requestedBotRole?.toLowerCase()];