Skip to content
10 changes: 5 additions & 5 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: "9.0.x"

Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
fi

- name: Upload Build Artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.output }}
path: ${{ matrix.output }}.zip
Expand All @@ -115,12 +115,12 @@ jobs:

steps:
- name: Download all build artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
path: artifacts # In the future if they add the ability to skip decompressing, I'll remove the zip step above

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@v3
with:
files: artifacts/*/*.zip
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/upgrade-pkhex.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Upgrade PKHeX
name: Upgrade PKHeX DLLs

on:
workflow_dispatch:
Expand All @@ -12,7 +12,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Checkout PKHeX Plugins
run: |
Expand All @@ -23,10 +23,10 @@ jobs:
run: |
git clone -q --depth=5 --branch=master https://github.com/kwsch/PKHeX.git ${{ github.workspace }}/PKHeX

- name: Setup .NET 9.0
uses: actions/setup-dotnet@v4
- name: Setup .NET 10.0
uses: actions/setup-dotnet@v5
with:
dotnet-version: '9.0.x'
dotnet-version: '10.0.x'

- name: Install NuGet
run: |
Expand All @@ -35,7 +35,7 @@ jobs:
echo "$(pwd)/.nuget/nuget.commandline/tools" >> $GITHUB_PATH

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
uses: microsoft/setup-msbuild@v3

- name: Restore NuGet dependencies for PKHeX-Plugins
run: nuget restore ${{ github.workspace }}/PKHeX-Plugins/PKHeX-Plugins.sln
Expand All @@ -51,16 +51,16 @@ jobs:
shell: powershell
run: |
$nugetver = (Get-ChildItem "$env:UserProfile/.nuget/packages/pkhex.core" | Sort-Object -Property LastWriteTime -Descending)[0].Name
Copy-Item "${{ github.workspace }}/PKHeX/PKHeX.Core/bin/Any CPU/Release/net9.0/PKHeX.Core.dll" "$env:UserProfile/.nuget/packages/pkhex.core/$nugetver/lib/net9.0"
Copy-Item "${{ github.workspace }}/PKHeX/PKHeX.Core/bin/Any CPU/Release/net10.0/PKHeX.Core.dll" "$env:UserProfile/.nuget/packages/pkhex.core/$nugetver/lib/net10.0"

- name: Build PKHeX.Core.AutoMod
run: |
msbuild ${{ github.workspace }}/PKHeX-Plugins/PKHeX.Core.AutoMod/PKHeX.Core.AutoMod.csproj /p:Configuration=Release /p:Platform="Any CPU"

- name: Prepare dlls
run: |
xcopy "${{ github.workspace }}\PKHeX-Plugins\PKHeX.Core.AutoMod\bin\Any CPU\Release\net9.0\PKHeX.Core.AutoMod.dll" ${{ github.workspace }}\GpssConsole\deps /Y
xcopy "${{ github.workspace }}\PKHeX\PKHeX.Core\bin\Any CPU\Release\net9.0\PKHeX.Core.dll" ${{ github.workspace }}\GpssConsole\deps /Y
xcopy "${{ github.workspace }}\PKHeX-Plugins\PKHeX.Core.AutoMod\bin\Any CPU\Release\net10.0\PKHeX.Core.AutoMod.dll" ${{ github.workspace }}\GpssConsole\deps /Y
xcopy "${{ github.workspace }}\PKHeX\PKHeX.Core\bin\Any CPU\Release\net10.0\PKHeX.Core.dll" ${{ github.workspace }}\GpssConsole\deps /Y

- name: Remove other repo directories
run: |
Expand All @@ -74,7 +74,7 @@ jobs:

- name: Build GpssConsole.csproj
run: |
msbuild ${{ github.workspace }}/GpssConsole.csproj /p:Configuration=Release /p:Platform="Any CPU"
msbuild ${{ github.workspace }}/GpssConsole/GpssConsole.csproj /p:Configuration=Release /p:Platform="Any CPU"
continue-on-error: true
id: GpssConsole-build

Expand All @@ -86,4 +86,4 @@ jobs:
git config --global user.email "github-actions@github.com"
git add GpssConsole/deps/PKHeX.Core.dll GpssConsole/deps/PKHeX.Core.AutoMod.dll
git commit -m "Update PKHeX.Core.dll and PKHeX.Core.AutoMod.dll"
git push origin master
git push origin ${{ github.event.repository.default_branch }}
Binary file modified GpssConsole/deps/PKHeX.Core.AutoMod.dll
Binary file not shown.
Binary file modified GpssConsole/deps/PKHeX.Core.dll
Binary file not shown.
10 changes: 7 additions & 3 deletions GpssConsole/models/Legality.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ public AutoLegalizationResult(LegalityAnalysis la, PKM? pokemon, bool ran)
Ran = ran;

if (pokemon == null) return;
PokemonBase64 = Convert.ToBase64String(pokemon.SIZE_PARTY > pokemon.SIZE_STORED
? pokemon.DecryptedPartyData
: pokemon.DecryptedBoxData);
bool useParty = pokemon.SIZE_PARTY > pokemon.SIZE_STORED;
byte[] data = new byte[useParty ? pokemon.SIZE_PARTY : pokemon.SIZE_STORED];
if (useParty)
pokemon.WriteDecryptedDataParty(data);
else
pokemon.WriteDecryptedDataStored(data);
PokemonBase64 = Convert.ToBase64String(data);
}
}
2 changes: 1 addition & 1 deletion GpssConsole/utils/PKhex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private static SimpleTrainerInfo _GetTrainerInfo(PKM pokemon, GameVersion? versi
TID16 = pokemon.TID16,
Language = pokemon.Language,
Gender = pokemon.OriginalTrainerGender,
Generation = pokemon.Context.Generation()
Generation = pokemon.Format
};
}
}