mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-11 19:16:59 -05:00
Fix OT->HT memory string output for HT verifier
Use the `memory.Handler string` value rather than recomputing. (lines 51, 64 pf memverify)
This commit is contained in:
@@ -263,7 +263,7 @@ private MemoryVariableSet(string handler, int m, int v, int i, int f)
|
||||
public static MemoryVariableSet Read(ITrainerMemories pkm, int handler) => handler switch
|
||||
{
|
||||
0 => new MemoryVariableSet(LegalityCheckStrings.L_XOT, pkm.OT_Memory, pkm.OT_TextVar, pkm.OT_Intensity, pkm.OT_Feeling), // OT
|
||||
1 => new MemoryVariableSet(LegalityCheckStrings.L_XOT, pkm.HT_Memory, pkm.HT_TextVar, pkm.HT_Intensity, pkm.HT_Feeling), // HT
|
||||
1 => new MemoryVariableSet(LegalityCheckStrings.L_XHT, pkm.HT_Memory, pkm.HT_TextVar, pkm.HT_Intensity, pkm.HT_Feeling), // HT
|
||||
_ => new MemoryVariableSet(LegalityCheckStrings.L_XOT, 0, 0, 0, 0)
|
||||
};
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ private CheckResult VerifyCommonMemory(PKM pkm, int handler, int gen, LegalInfo
|
||||
case 71 when !GetCanDynamaxTrainer(memory.Variable, 8, handler == 0 ? (GameVersion)pkm.Version : GameVersion.Any):
|
||||
// {0} battled {2} and Dynamaxed upon {1}’s instruction. {4} that {3}.
|
||||
case 72 when !((PersonalInfoSWSH)PersonalTable.SWSH[memory.Variable]).IsPresentInGame:
|
||||
return GetInvalid(string.Format(LMemoryArgBadSpecies, handler == 0 ? L_XOT : L_XHT));
|
||||
return GetInvalid(string.Format(LMemoryArgBadSpecies, memory.Handler));
|
||||
|
||||
// Move
|
||||
// {0} studied about how to use {2} in a Box, thinking about {1}. {4} that {3}.
|
||||
@@ -61,7 +61,7 @@ private CheckResult VerifyCommonMemory(PKM pkm, int handler, int gen, LegalInfo
|
||||
// {0} became good friends with the {2} in a Box, practiced moves with it, and talked about the day that {0} would be praised by {1}. {4} that {3}.
|
||||
// {0} got in a fight with the {2} that it was in a Box with about {1}. {4} that {3}.
|
||||
case 82 or 83 or 87 when !((PersonalInfoSWSH)PersonalTable.SWSH[memory.Variable]).IsPresentInGame:
|
||||
return GetInvalid(string.Format(LMemoryArgBadSpecies, handler == 0 ? L_XOT : L_XHT));
|
||||
return GetInvalid(string.Format(LMemoryArgBadSpecies, memory.Handler));
|
||||
|
||||
// Item
|
||||
// {0} went to a Pokémon Center with {1} to buy {2}. {4} that {3}.
|
||||
@@ -297,10 +297,10 @@ private void VerifyHTMemory(LegalityAnalysis data)
|
||||
|
||||
// {0} went to the Pokémon Center in {2} with {1} and had its tired body healed there. {4} that {3}.
|
||||
case 6 when memoryGen == 6 && !Memories.GetHasPokeCenterLocation(GameVersion.Gen6, mem.HT_TextVar):
|
||||
data.AddLine(GetInvalid(string.Format(LMemoryArgBadLocation, L_XOT)));
|
||||
data.AddLine(GetInvalid(string.Format(LMemoryArgBadLocation, L_XHT)));
|
||||
return;
|
||||
case 6 when memoryGen == 8 && mem.HT_TextVar != 0:
|
||||
data.AddLine(Get(string.Format(LMemoryArgBadLocation, L_XOT), ParseSettings.Gen8MemoryLocationTextVariable));
|
||||
data.AddLine(Get(string.Format(LMemoryArgBadLocation, L_XHT), ParseSettings.Gen8MemoryLocationTextVariable));
|
||||
return;
|
||||
|
||||
// {0} was with {1} when {1} caught {2}. {4} that {3}.
|
||||
|
||||
Reference in New Issue
Block a user