Further improvements to setRandomisedGameVersionAndCategory() to handle unheard profiles the same as live

This commit is contained in:
Dev 2024-06-17 10:23:13 +01:00
parent 020c30d55b
commit d315414136
2 changed files with 16 additions and 12 deletions

View File

@ -592,16 +592,19 @@ export class BotGenerator
return botInfo.GameVersion;
}
// More color = more op
// Choose random weighted game version for bot
botInfo.GameVersion = this.weightedRandomHelper.getWeightedValue(this.pmcConfig.gameVersionWeight);
// EOD and UhD must have a category of 2 for their unique icons to show
if ([GameEditions.EDGE_OF_DARKNESS, GameEditions.UNHEARD].includes(<any>botInfo.GameVersion))
{
botInfo.MemberCategory = 2;
}
else
// Choose appropriate member category value
switch (botInfo.GameVersion)
{
case GameEditions.EDGE_OF_DARKNESS:
botInfo.MemberCategory = MemberCategory.UNIQUE_ID;
break;
case GameEditions.UNHEARD:
botInfo.MemberCategory = MemberCategory.UNHEARD;
break;
default:
// Everyone else gets a weighted randomised category
botInfo.MemberCategory = Number.parseInt(
this.weightedRandomHelper.getWeightedValue(this.pmcConfig.accountTypeWeight),

View File

@ -11,4 +11,5 @@ export enum MemberCategory
UNIT_TEST = 128,
SHERPA = 256,
EMISSARY = 512,
UNHEARD = 1024,
}