mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 20:43:07 +00:00
Account for memory feeling off-by-one bug
If the feeling is zero the game's string formatter will treat it as null, and will newline before the period. Gen6 (if I recall correctly) had "it was happy" as index 0 Gen8 (new) has "it was happy" as index 1, with 0 being invalid-bad. Slice the array differently for gen8 to include the empty line as index 0. Closes #2549 , ty @crzyc && @architdate for testing index 0 :)
This commit is contained in:
parent
f54bc7bf6f
commit
5e1fd36b96
2 changed files with 2 additions and 2 deletions
|
@ -56,7 +56,7 @@ namespace PKHeX.Core
|
|||
}
|
||||
|
||||
public string[] GetMemoryQualities() => s.memories.Slice(2, 7);
|
||||
public string[] GetMemoryFeelings() => s.memories.Slice(10, 24);
|
||||
public string[] GetMemoryFeelings(int format) => format >= 8 ? s.memories.Slice(9, 25) : s.memories.Slice(10, 24); // empty line for 0 in gen8+
|
||||
|
||||
public List<ComboItem> GetArgumentStrings(MemoryArgType memIndex)
|
||||
{
|
||||
|
|
|
@ -201,7 +201,7 @@ namespace PKHeX.WinForms
|
|||
}
|
||||
|
||||
// Feeling Chooser
|
||||
foreach (var q in strings.GetMemoryFeelings())
|
||||
foreach (var q in strings.GetMemoryFeelings(pkm.Format))
|
||||
{
|
||||
CB_CTFeel.Items.Add(q);
|
||||
CB_OTFeel.Items.Add(q);
|
||||
|
|
Loading…
Reference in a new issue