From f2cd7a909750aa598c491ff57d1aba2a4e17dbc8 Mon Sep 17 00:00:00 2001 From: Kaphotics Date: Sun, 17 Apr 2016 13:52:37 -0700 Subject: [PATCH] Generate date on wc6full input date value = 0 -> datetime.now --- Misc/WC6.cs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Misc/WC6.cs b/Misc/WC6.cs index fabeef8ec..a2c9be72a 100644 --- a/Misc/WC6.cs +++ b/Misc/WC6.cs @@ -225,9 +225,6 @@ public PK6 convertToPK6(SAV6 SAV) RelearnMove1 = RelearnMove1, RelearnMove2 = RelearnMove2, RelearnMove3 = RelearnMove3, RelearnMove4 = RelearnMove4, Met_Location = MetLocation, - Met_Day = (int)Day, - Met_Month = (int)Month, - Met_Year = (int)Year - 2000, Egg_Location = EggLocation, CNT_Cool = CNT_Cool, CNT_Beauty = CNT_Beauty, @@ -266,6 +263,21 @@ public PK6 convertToPK6(SAV6 SAV) OT_Friendship = PKX.getBaseFriendship(Species), FatefulEncounter = true, }; + + if (Day + Month + Year == 0) // No datetime set, typical for wc6full + { + DateTime dt = DateTime.Now; + pk.Met_Day = dt.Day; + pk.Met_Month = dt.Month; + pk.Met_Year = dt.Year - 2000; + } + else + { + pk.Met_Day = (int)Day; + pk.Met_Month = (int)Month; + pk.Met_Year = (int)(Year - 2000); + } + if (pk.CurrentHandler == 0) // OT { pk.OT_Memory = 3;