Slightly simplified phone trainer contacts

This commit is contained in:
Maruno17
2023-03-07 20:58:45 +00:00
parent 3a9199da1b
commit 9f96684048
3 changed files with 32 additions and 34 deletions

View File

@@ -364,11 +364,12 @@ SaveData.register_conversion(:v21_replace_phone_data) do
@phoneNumbers.each do |contact|
if contact.length > 4
# Trainer
# TODO: Is there any way to ensure the versions count is accurate?
Phone.add_silent(contact[6], contact[7], contact[1], contact[2], 0, [contact[5], 3].max)
# TODO: Is there any way to ensure the versions count (contact[5]
# is the next version to be battled) is accurate?
Phone.add_silent(contact[6], contact[7], contact[1], contact[2], contact[5], 0)
new_contact = Phone.get(contact[1], contact[2], 0)
new_contact.visible = contact[0]
new_contact.version = contact[5]
new_contact.version = [contact[5] - 1, 0].max
new_contact.rematch_flag = [contact[4] - 1, 0].max
else
# Non-trainer