Merge pull request #2 from kwsch/master

Update from upstream repo kwsch/PKHeX
This commit is contained in:
pokecal 2017-03-02 11:21:56 +09:00 committed by GitHub
commit 8e2d9fdba1
6 changed files with 60 additions and 14 deletions

View file

@ -877,11 +877,11 @@ namespace PKHeX.WinForms
}
}
// Finish setting up the save file.
if (sav.IndeterminateGame && sav.Generation == 3)
if (sav.Generation == 3 && (sav.IndeterminateGame || ModifierKeys == Keys.Control))
{
// Hacky cheats invalidated the Game Code value.
var drGame = WinFormsUtil.Prompt(MessageBoxButtons.YesNoCancel,
"Unknown Gen3 Game Detected. Select Origins:",
"Gen3 Game Detected. Select Origins:",
"Yes: Ruby / Sapphire" + Environment.NewLine +
"No: Emerald" + Environment.NewLine +
"Cancel: FireRed / LeafGreen");

View file

@ -35,7 +35,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;CLICKONCE;WINDOWS</DefineConstants>
<DefineConstants>DEBUG;WINDOWS</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
@ -45,7 +45,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>CLICKONCE;WINDOWS</DefineConstants>
<DefineConstants>WINDOWS</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
@ -77,7 +77,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;CLICKONCE;WINDOWS</DefineConstants>
<DefineConstants>DEBUG;WINDOWS</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
@ -87,7 +87,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>CLICKONCE;WINDOWS</DefineConstants>
<DefineConstants>WINDOWS</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
@ -116,15 +116,38 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ClickOnce|x86'">
<OutputPath>bin\x86\ClickOnce\</OutputPath>
<DefineConstants>CLICKONCE;WINDOWS</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<NoWin32Manifest>true</NoWin32Manifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ClickOnce|AnyCPU'">
<OutputPath>bin\ClickOnce\</OutputPath>
<DefineConstants>CLICKONCE;WINDOWS</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
<NoWin32Manifest>true</NoWin32Manifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup Condition="'$(Configuration)' == 'ClickOnce'">
<Reference Include="System.Deployment" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainWindow\Main.cs">
<SubType>Form</SubType>

View file

@ -19,6 +19,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PKHeX.WinForms", "PKHeX.Win
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
ClickOnce|Any CPU = ClickOnce|Any CPU
ClickOnce|x86 = ClickOnce|x86
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Mono-Debug|Any CPU = Mono-Debug|Any CPU
@ -29,6 +31,10 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B4EFF030-C75A-49F9-A4BC-738D1B61C4AF}.ClickOnce|Any CPU.ActiveCfg = Release|Any CPU
{B4EFF030-C75A-49F9-A4BC-738D1B61C4AF}.ClickOnce|Any CPU.Build.0 = Release|Any CPU
{B4EFF030-C75A-49F9-A4BC-738D1B61C4AF}.ClickOnce|x86.ActiveCfg = Release|x86
{B4EFF030-C75A-49F9-A4BC-738D1B61C4AF}.ClickOnce|x86.Build.0 = Release|x86
{B4EFF030-C75A-49F9-A4BC-738D1B61C4AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B4EFF030-C75A-49F9-A4BC-738D1B61C4AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B4EFF030-C75A-49F9-A4BC-738D1B61C4AF}.Debug|x86.ActiveCfg = Debug|x86
@ -45,6 +51,10 @@ Global
{B4EFF030-C75A-49F9-A4BC-738D1B61C4AF}.Release|Any CPU.Build.0 = Release|Any CPU
{B4EFF030-C75A-49F9-A4BC-738D1B61C4AF}.Release|x86.ActiveCfg = Release|x86
{B4EFF030-C75A-49F9-A4BC-738D1B61C4AF}.Release|x86.Build.0 = Release|x86
{8E2499BC-C11A-4809-8737-66D35A625425}.ClickOnce|Any CPU.ActiveCfg = Release|Any CPU
{8E2499BC-C11A-4809-8737-66D35A625425}.ClickOnce|Any CPU.Build.0 = Release|Any CPU
{8E2499BC-C11A-4809-8737-66D35A625425}.ClickOnce|x86.ActiveCfg = Release|x86
{8E2499BC-C11A-4809-8737-66D35A625425}.ClickOnce|x86.Build.0 = Release|x86
{8E2499BC-C11A-4809-8737-66D35A625425}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E2499BC-C11A-4809-8737-66D35A625425}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E2499BC-C11A-4809-8737-66D35A625425}.Debug|x86.ActiveCfg = Debug|x86
@ -57,6 +67,10 @@ Global
{8E2499BC-C11A-4809-8737-66D35A625425}.Release|Any CPU.Build.0 = Release|Any CPU
{8E2499BC-C11A-4809-8737-66D35A625425}.Release|x86.ActiveCfg = Release|x86
{8E2499BC-C11A-4809-8737-66D35A625425}.Release|x86.Build.0 = Release|x86
{D1B91861-A448-4762-A313-C7BC179F4415}.ClickOnce|Any CPU.ActiveCfg = ClickOnce|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.ClickOnce|Any CPU.Build.0 = ClickOnce|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.ClickOnce|x86.ActiveCfg = Release|x86
{D1B91861-A448-4762-A313-C7BC179F4415}.ClickOnce|x86.Build.0 = Release|x86
{D1B91861-A448-4762-A313-C7BC179F4415}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.Debug|x86.ActiveCfg = Debug|x86

View file

@ -430,7 +430,16 @@ namespace PKHeX.Core
769, 771, 774, 775, 776, 777, 778, 779, 780, 781,
782
};
internal static readonly int[] Inherit_Apricorn7 = Inherit_Apricorn6.Concat(PastGenAlolanScans).Concat(AlolanCaptureOffspring).Distinct().ToArray();
internal static readonly int[] Inherit_ApricornMale7 =
{
100, // Voltorb
343, // Baltoy
436, // Bronzor
// Others are capturable in the Alola region
// Magnemite, Staryu, Tauros
};
internal static readonly int[] Inherit_Apricorn7 = Inherit_Apricorn6.Concat(Inherit_ApricornMale7).Concat(PastGenAlolanScans).Concat(AlolanCaptureOffspring).Distinct().ToArray();
internal static readonly int[] Inherit_SafariMale =
{
128, // Tauros

View file

@ -75,7 +75,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;CLICKONCE;WINDOWS</DefineConstants>
<DefineConstants>DEBUG;WINDOWS</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
@ -85,7 +85,7 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DefineConstants>CLICKONCE;WINDOWS</DefineConstants>
<DefineConstants>WINDOWS</DefineConstants>
<OutputPath>bin\x86\Release\</OutputPath>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
@ -122,7 +122,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;CLICKONCE;WINDOWS</DefineConstants>
<DefineConstants>DEBUG;WINDOWS</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
@ -132,7 +132,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>CLICKONCE;WINDOWS</DefineConstants>
<DefineConstants>WINDOWS</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>

View file

@ -759,7 +759,7 @@ namespace PKHeX.Core
const int brSize = 0x40;
int bit = pkm.Species - 1;
byte mask = (byte) (1 << (bit&7));
int ofs = PokeDex + bit>>3 + 0x4;
int ofs = PokeDex + (bit>>3) + 0x4;
// Set the Species Owned Flag
Data[ofs + brSize*0] |= mask;