mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-07 13:25:09 -05:00
Generate date on wc6full input
date value = 0 -> datetime.now
This commit is contained in:
18
Misc/WC6.cs
18
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;
|
||||
|
||||
Reference in New Issue
Block a user