From a5710ee3748f74ceaf86f85198d3c754f7e11e4c Mon Sep 17 00:00:00 2001 From: Kurt Date: Fri, 25 Feb 2022 13:29:43 -0800 Subject: [PATCH] Fix PLA box flag setter nice boo boo matt --- PKHeX.Core/Saves/SAV8LA.cs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/PKHeX.Core/Saves/SAV8LA.cs b/PKHeX.Core/Saves/SAV8LA.cs index dd224438e..610aaaaba 100644 --- a/PKHeX.Core/Saves/SAV8LA.cs +++ b/PKHeX.Core/Saves/SAV8LA.cs @@ -204,20 +204,12 @@ public sealed class SAV8LA : SaveFile, ISaveBlock8LA, ISCBlockArray }; set { - if (value.Length != 1) + if (value.Length != 3) return; - var blocks = new[] - { - Blocks.GetBlock(SaveBlockAccessor8LA.KUnlockedSecretBox01), - Blocks.GetBlock(SaveBlockAccessor8LA.KUnlockedSecretBox02), - Blocks.GetBlock(SaveBlockAccessor8LA.KUnlockedSecretBox03), - }; - - foreach (var block in blocks) - { - block.ChangeBooleanType((SCTypeCode)(value[0] & 1) + 1); - } + Blocks.GetBlock(SaveBlockAccessor8LA.KUnlockedSecretBox01).ChangeBooleanType((SCTypeCode)(value[0] & 1) + 1); + Blocks.GetBlock(SaveBlockAccessor8LA.KUnlockedSecretBox02).ChangeBooleanType((SCTypeCode)(value[1] & 1) + 1); + Blocks.GetBlock(SaveBlockAccessor8LA.KUnlockedSecretBox03).ChangeBooleanType((SCTypeCode)(value[2] & 1) + 1); } }