1
mirror of https://github.com/thepeacockproject/Peacock synced 2024-11-22 22:12:45 +01:00

Fix double-unlocking stuff when masteryprogression is disabled (#481)

This commit is contained in:
Govert de Gans 2024-06-27 00:42:33 +02:00 committed by GitHub
parent 0f9c41b55e
commit dfca18a0aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -631,6 +631,11 @@ export function grantDrops(profileId: string, drops: Unlockable[]): void {
assert.fail(`User ${profileId} does not have an inventory??!`)
}
if (!getFlag("enableMasteryProgression")) {
// mastery is disabled, everything is already unlocked, don't double-unlock
return
}
const inventoryItems: InventoryItem[] = drops.map((unlockable) => ({
InstanceId: unlockable.Guid,
ProfileId: profileId,