Closed Gannio closed 9 months ago
For starters, please use the PKHex Nuget package. I don’t want 9000 files cluttering up my repo. If you have made changes to the PKHex library, make a private fork of it and include it as a submodule.
Additionally, pkhex isn’t going to work for battle tower.
Sent from my iPhone
On Sep 16, 2019, at 2:42 PM, Gannio notifications@github.com wrote:
This is a quick attempt at implementing a legitimacy check using PKHex's Core, having both basic sanity checks and optional, but thorough legitimacy checks. However, since I don't have the hardware necessary to properly test the server (and even if I did my college blocks ports making testing difficult), I don't have a means to actually test this code, so it should be tested to make sure it does not cause compiler errors when running.
The version of the core used is the one present in PKHex's source on 9/3/2019, however it contains an extra method to specifically check for ball seals, as they could cause irremovable Pokemon if not checked for. The validation method is also currently only implemented for Gen IV, however it shouldn't take too much work to add to Gen V (the main difference is changing a 0 to a 1). Finally, the method for decrypting the encrypted data (PKX.DecryptArray45) may not actually work properly, as I normally used a method inherent to Shiny2+1/2 to decrypt data rather than PKHex's decryption method.
Also PKHex uses GPL 3 as its license, however I don't think that particular license would violate anything the current program uses.
(For the file changes: Discarding the addition of PKHex as a reference in the gts class, pokemondpds.ashx.cs was the only file modified)
You can view, comment on, or merge this pull request online at:
https://github.com/mm201/pkmn-classic-framework/pull/71
Commit Summary
Pseudocode for a legitimacy check through PKHex. File Changes
A PKHeX.Core/Editing/BallRandomizer.cs (162) A PKHeX.Core/Editing/Bulk/BatchEditing.cs (481) A PKHeX.Core/Editing/Bulk/BatchEditor.cs (81) A PKHeX.Core/Editing/Bulk/ModifyResult.cs (28) A PKHeX.Core/Editing/Bulk/PKMInfo.cs (18) A PKHeX.Core/Editing/Bulk/StringInstruction.cs (95) A PKHeX.Core/Editing/Bulk/StringInstructionSet.cs (35) A PKHeX.Core/Editing/CommonEdits.cs (714) A PKHeX.Core/Editing/HiddenPower.cs (181) A PKHeX.Core/Editing/IPKMView.cs (48) A PKHeX.Core/Editing/IPlugin.cs (41) A PKHeX.Core/Editing/ISaveFileProvider.cs (23) A PKHeX.Core/Editing/ISpriteBuilder.cs (15) A PKHeX.Core/Editing/PKM/EditPKMUtil.cs (81) A PKHeX.Core/Editing/PKM/LegalMoveSource.cs (51) A PKHeX.Core/Editing/PKM/PKMSummary.cs (129) A PKHeX.Core/Editing/Saves/BoxManipClear.cs (78) A PKHeX.Core/Editing/Saves/BoxManipModify.cs (50) A PKHeX.Core/Editing/Saves/BoxManipParam.cs (9) A PKHeX.Core/Editing/Saves/BoxManipSort.cs (66) A PKHeX.Core/Editing/Saves/BoxManipType.cs (45) A PKHeX.Core/Editing/Saves/BoxManipUtil.cs (64) A PKHeX.Core/Editing/Saves/BoxManipulator.cs (73) A PKHeX.Core/Editing/Saves/Editors/EventWork/EventFlag.cs (17) A PKHeX.Core/Editing/Saves/Editors/EventWork/EventVar.cs (35) A PKHeX.Core/Editing/Saves/Editors/EventWork/EventVarGroup.cs (12) A PKHeX.Core/Editing/Saves/Editors/EventWork/EventWork.cs (32) A PKHeX.Core/Editing/Saves/Editors/EventWork/EventWorkDiff.cs (149) A PKHeX.Core/Editing/Saves/Editors/EventWork/EventWorkUtil.cs (114) A PKHeX.Core/Editing/Saves/Editors/EventWork/EventWorkVal.cs (25) A PKHeX.Core/Editing/Saves/Editors/EventWork/SplitEventEditor.cs (67) A PKHeX.Core/Editing/Saves/Editors/SaveDataEditor.cs (20) A PKHeX.Core/Editing/Saves/IBoxManip.cs (16) A PKHeX.Core/Editing/Saves/SlotView/SlotArray.cs (13) A PKHeX.Core/Editing/Saves/SlotView/SlotBoxes.cs (13) A PKHeX.Core/Editing/Saves/SlotView/SlotDaycare.cs (39) A PKHeX.Core/Editing/Saves/SlotView/SlotList.cs (14) A PKHeX.Core/Editing/Saves/SlotView/SlotView.cs (175) A PKHeX.Core/Editing/Saves/SlotView/SlotViewSet.cs (85) A PKHeX.Core/Editing/Saves/Slots/BoxEdit.cs (56) A PKHeX.Core/Editing/Saves/Slots/Extensions.cs (142) A PKHeX.Core/Editing/Saves/Slots/ISlotViewer.cs (54) A PKHeX.Core/Editing/Saves/Slots/Info/ISlotInfo.cs (16) A PKHeX.Core/Editing/Saves/Slots/Info/SlotInfoBox.cs (33) A PKHeX.Core/Editing/Saves/Slots/Info/SlotInfoMisc.cs (41) A PKHeX.Core/Editing/Saves/Slots/Info/SlotInfoParty.cs (39) A PKHeX.Core/Editing/Saves/Slots/Info/WriteBlockedMessage.cs (13) A PKHeX.Core/Editing/Saves/Slots/SlotChangelog.cs (95) A PKHeX.Core/Editing/Saves/Slots/SlotEditor.cs (113) A PKHeX.Core/Editing/Saves/Slots/SlotPublisher.cs (45) A PKHeX.Core/Editing/Saves/Slots/SlotTouchResult.cs (38) A PKHeX.Core/Editing/Saves/Slots/SlotTouchType.cs (16) A PKHeX.Core/Editing/Saves/Slots/SlotViewInfo.cs (16) A PKHeX.Core/Editing/Saves/Slots/StorageSlotType.cs (14) A PKHeX.Core/Editing/ShowdownSet.cs (751) A PKHeX.Core/Editing/WurmpleUtil.cs (55) A PKHeX.Core/Game/Ability.cs (244) A PKHeX.Core/Game/Ball.cs (52) A PKHeX.Core/Game/ComboItem.cs (54) A PKHeX.Core/Game/GCVersion.cs (57) A PKHeX.Core/Game/GameData.cs (164) A PKHeX.Core/Game/GameStrings/FilteredGameDataSource.cs (106) A PKHeX.Core/Game/GameStrings/GameDataSource.cs (284) A PKHeX.Core/Game/GameStrings/GameInfo.cs (88) A PKHeX.Core/Game/GameStrings/GameLanguage.cs (94) A PKHeX.Core/Game/GameStrings/GameStrings.cs (483) A PKHeX.Core/Game/GameStrings/GeoLocation.cs (132) A PKHeX.Core/Game/GameStrings/MemoryArgType.cs (12) A PKHeX.Core/Game/GameStrings/MemoryStrings.cs (86) A PKHeX.Core/Game/GameUtil.cs (275) A PKHeX.Core/Game/GameVersion.cs (473) A PKHeX.Core/Game/Gender.cs (15) A PKHeX.Core/Game/IBasicStrings.cs (22) A PKHeX.Core/Game/LanguageGC.cs (50) A PKHeX.Core/Game/LanguageID.cs (85) A PKHeX.Core/Game/MoveType.cs (49) A PKHeX.Core/Game/Nature.cs (36) A PKHeX.Core/Game/RegionID.cs (16) A PKHeX.Core/Game/Species.cs (820)
A PKHeX.Core/Legality/Analysis.cs (449) A PKHeX.Core/Legality/Areas/EncounterArea.cs (1070) A PKHeX.Core/Legality/Areas/TreeCoordinates.cs (19) A PKHeX.Core/Legality/Areas/TreeEncounterAvailable.cs (23) A PKHeX.Core/Legality/Areas/TreesArea.cs (123) A PKHeX.Core/Legality/BulkAnalysis.cs (295) A PKHeX.Core/Legality/Checks.cs (37)
A PKHeX.Core/Legality/Core.cs (925) A PKHeX.Core/Legality/Data.cs (36) A PKHeX.Core/Legality/Encounters/Data/EncounterEvent.cs (110) A PKHeX.Core/Legality/Encounters/Data/EncounterUtil.cs (289) A PKHeX.Core/Legality/Encounters/Data/Encounters1.cs (214) A PKHeX.Core/Legality/Encounters/Data/Encounters2.cs (293) A PKHeX.Core/Legality/Encounters/Data/Encounters3.cs (642) A PKHeX.Core/Legality/Encounters/Data/Encounters3Shadow.cs (1081) A PKHeX.Core/Legality/Encounters/Data/Encounters3Teams.cs (93) A PKHeX.Core/Legality/Encounters/Data/Encounters4.cs (1678) A PKHeX.Core/Legality/Encounters/Data/Encounters5.cs (1006) A PKHeX.Core/Legality/Encounters/Data/Encounters6.cs (410) A PKHeX.Core/Legality/Encounters/Data/Encounters7.cs (485) A PKHeX.Core/Legality/Encounters/Data/Encounters7b.cs (203) A PKHeX.Core/Legality/Encounters/Data/EncountersWC3.cs (261) A PKHeX.Core/Legality/Encounters/EncounterEgg.cs (143) A PKHeX.Core/Legality/Encounters/EncounterInvalid.cs (29) A PKHeX.Core/Legality/Encounters/EncounterRejected.cs (30) A PKHeX.Core/Legality/Encounters/EncounterSlot.cs (184) A PKHeX.Core/Legality/Encounters/EncounterSlot1.cs (15) A PKHeX.Core/Legality/Encounters/EncounterSlotMoves.cs (7) A PKHeX.Core/Legality/Encounters/EncounterSlotPermissions.cs (19) A PKHeX.Core/Legality/Encounters/EncounterStatic.cs (376) A PKHeX.Core/Legality/Encounters/EncounterStaticPID.cs (37) A PKHeX.Core/Legality/Encounters/EncounterStaticShadow.cs (23) A PKHeX.Core/Legality/Encounters/EncounterStaticTyped.cs (7) A PKHeX.Core/Legality/Encounters/EncounterTrade.cs (393) A PKHeX.Core/Legality/Encounters/EncounterTradeCatchRate.cs (13) A PKHeX.Core/Legality/Encounters/EncounterTradePID.cs (25) A PKHeX.Core/Legality/Encounters/Generator/EncounterCriteria.cs (99) A PKHeX.Core/Legality/Encounters/Generator/EncounterEggGenerator.cs (65) A PKHeX.Core/Legality/Encounters/Generator/EncounterFinder.cs (124) A PKHeX.Core/Legality/Encounters/Generator/EncounterGenerator.cs (529) A PKHeX.Core/Legality/Encounters/Generator/EncounterMatchRating.cs (9) A PKHeX.Core/Legality/Encounters/Generator/EncounterMovesetGenerator.cs (321) A PKHeX.Core/Legality/Encounters/Generator/EncounterOrder.cs (11) A PKHeX.Core/Legality/Encounters/Generator/EncounterSlotGenerator.cs (534)
A PKHeX.Core/Legality/Encounters/Generator/EncounterStaticGenerator.cs (0) A PKHeX.Core/Legality/Encounters/Generator/EncounterTradeGenerator.cs (0) A PKHeX.Core/Legality/Encounters/Generator/MysteryGiftGenerator.cs (0) A PKHeX.Core/Legality/Encounters/Generator/PeekEnumerator.cs (0) A PKHeX.Core/Legality/Encounters/Information/EncounterLearn.cs (0) A PKHeX.Core/Legality/Encounters/Information/EncounterSuggestion.cs (0) A PKHeX.Core/Legality/Encounters/Information/ValidEncounterMoves.cs (0) A PKHeX.Core/Legality/Encounters/LegalInfo.cs (0) A PKHeX.Core/Legality/Encounters/Verifiers/EncounterVerifier.cs (0) A PKHeX.Core/Legality/Encounters/Verifiers/EvolutionVerifier.cs (0) A PKHeX.Core/Legality/Encounters/Verifiers/MysteryGiftRestriction.cs (0) A PKHeX.Core/Legality/Encounters/Verifiers/MysteryGiftVerifier.cs (0) A PKHeX.Core/Legality/Encounters/Verifiers/VerifyCurrentMoves.cs (0) A PKHeX.Core/Legality/Encounters/Verifiers/VerifyRelearnMoves.cs (0) A PKHeX.Core/Legality/Enums/CheckIdentifier.cs (0) A PKHeX.Core/Legality/Enums/EncounterTime.cs (0) A PKHeX.Core/Legality/Enums/EncounterType.cs (0) A PKHeX.Core/Legality/Enums/Severity.cs (0) A PKHeX.Core/Legality/Enums/SlotType.cs (0) A PKHeX.Core/Legality/Enums/TradebackType.cs (0) A PKHeX.Core/Legality/Evolutions/DexLevel.cs (0) A PKHeX.Core/Legality/Evolutions/EvoCriteria.cs (0) A PKHeX.Core/Legality/Evolutions/EvolutionChain.cs (0) A PKHeX.Core/Legality/Evolutions/EvolutionLineage.cs (0) A PKHeX.Core/Legality/Evolutions/EvolutionMethod.cs (0) A PKHeX.Core/Legality/Evolutions/EvolutionSet.cs (0) A PKHeX.Core/Legality/Evolutions/EvolutionSets/EvolutionSet1.cs (0) A PKHeX.Core/Legality/Evolutions/EvolutionSets/EvolutionSet3.cs (0) A PKHeX.Core/Legality/Evolutions/EvolutionSets/EvolutionSet4.cs (0) A PKHeX.Core/Legality/Evolutions/EvolutionSets/EvolutionSet5.cs (0) A PKHeX.Core/Legality/Evolutions/EvolutionSets/EvolutionSet6.cs (0) A PKHeX.Core/Legality/Evolutions/EvolutionSets/EvolutionSet7.cs (0) A PKHeX.Core/Legality/Evolutions/EvolutionTree.cs (0) A PKHeX.Core/Legality/Evolutions/EvolutionType.cs (0) A PKHeX.Core/Legality/GBRestrictions.cs (0) A PKHeX.Core/Legality/Learnset/Learnset.cs (0) A PKHeX.Core/Legality/Learnset/Learnset1.cs (0) A PKHeX.Core/Legality/Learnset/Learnset6.cs (0) A PKHeX.Core/Legality/LegalityCheckStrings.cs (0) A PKHeX.Core/Legality/Memories.cs (0) A PKHeX.Core/Legality/Moves/EggInfoSource.cs (0) A PKHeX.Core/Legality/Moves/LearnInfo.cs (0) A PKHeX.Core/Legality/Moves/LearnLookup.cs (0) A PKHeX.Core/Legality/Moves/MoveEgg.cs (0) A PKHeX.Core/Legality/Moves/MoveLevelUp.cs (0) A PKHeX.Core/Legality/Moves/MoveParseSource.cs (0) A PKHeX.Core/Legality/Moves/MoveTechnicalMachine.cs (0) A PKHeX.Core/Legality/Moves/MoveTutor.cs (0) A PKHeX.Core/Legality/RNG/Frame/Frame.cs (0) A PKHeX.Core/Legality/RNG/Frame/FrameCache.cs (0) A PKHeX.Core/Legality/RNG/Frame/FrameFinder.cs (0) A PKHeX.Core/Legality/RNG/Frame/FrameGenerator.cs (0) A PKHeX.Core/Legality/RNG/Frame/FrameType.cs (0) A PKHeX.Core/Legality/RNG/Frame/LeadRequired.cs (0) A PKHeX.Core/Legality/RNG/Frame/LockInfo.cs (0) A PKHeX.Core/Legality/RNG/Frame/Pokeblock.cs (0) A PKHeX.Core/Legality/RNG/Frame/SeedInfo.cs (0) A PKHeX.Core/Legality/RNG/Frame/SlotRange.cs (0) A PKHeX.Core/Legality/RNG/Locks/LockFinder.cs (0) A PKHeX.Core/Legality/RNG/Locks/NPCLock.cs (0) A PKHeX.Core/Legality/RNG/Locks/SeedFrame.cs (0) A PKHeX.Core/Legality/RNG/Locks/TeamLock.cs (0) A PKHeX.Core/Legality/RNG/Locks/TeamLockResult.cs (0) A PKHeX.Core/Legality/RNG/MethodFinder.cs (0) A PKHeX.Core/Legality/RNG/PIDGenerator.cs (0) A PKHeX.Core/Legality/RNG/PIDIV.cs (0) A PKHeX.Core/Legality/RNG/PIDType.cs (0) A PKHeX.Core/Legality/RNG/PIDTypeInfo.cs (0) A PKHeX.Core/Legality/RNG/RNG.cs (0) A PKHeX.Core/Legality/Structures/CheckMoveResult.cs (0) A PKHeX.Core/Legality/Structures/CheckResult.cs (0) A PKHeX.Core/Legality/Structures/EggMoves.cs (0) A PKHeX.Core/Legality/Structures/IEncounterable.cs (0) A PKHeX.Core/Legality/Structures/IGeneration.cs (0) A PKHeX.Core/Legality/Structures/ILocation.cs (0) A PKHeX.Core/Legality/Structures/IMoveset.cs (0) A PKHeX.Core/Legality/Structures/ITrainerInfo.cs (0) A PKHeX.Core/Legality/Structures/IVersion.cs (0) A PKHeX.Core/Legality/Structures/Shiny.cs (0) A PKHeX.Core/Legality/Structures/SimpleTrainerInfo.cs (0) A PKHeX.Core/Legality/Tables/Locations.cs (0) A PKHeX.Core/Legality/Tables/MystryMew.cs (0) A PKHeX.Core/Legality/Tables/Tables.cs (0) A PKHeX.Core/Legality/Tables/Tables1.cs (0) A PKHeX.Core/Legality/Tables/Tables2.cs (0) A PKHeX.Core/Legality/Tables/Tables3.cs (0) A PKHeX.Core/Legality/Tables/Tables4.cs (0) A PKHeX.Core/Legality/Tables/Tables5.cs (0) A PKHeX.Core/Legality/Tables/Tables6.cs (0) A PKHeX.Core/Legality/Tables/Tables7.cs (0) A PKHeX.Core/Legality/Tables/Tables7b.cs (0) A PKHeX.Core/Legality/Verifiers/AbilityVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/BallVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/CXDVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/ConsoleRegionVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/EffortValueVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/EncounterTypeVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/FormVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/GenderVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/HyperTrainingVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/IndividualValueVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/ItemVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/LanguageVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/LevelVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/MedalVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/MemoryVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/MiscVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/NHarmoniaVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/NicknameVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/PIDVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/ParseSettings.cs (0) A PKHeX.Core/Legality/Verifiers/Ribbons/RibbonResult.cs (0) A PKHeX.Core/Legality/Verifiers/Ribbons/RibbonStrings.cs (0) A PKHeX.Core/Legality/Verifiers/Ribbons/RibbonVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/TrainerNameVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/TransferVerifier.cs (0) A PKHeX.Core/Legality/Verifiers/Verifier.cs (0) A PKHeX.Core/Legality/VivillonTables.cs (0) A PKHeX.Core/Legality/WordFilter.cs (0) A PKHeX.Core/MysteryGifts/MysteryGift.cs (0) A PKHeX.Core/MysteryGifts/MysteryUtil.cs (0) A PKHeX.Core/MysteryGifts/PCD.cs (0) A PKHeX.Core/MysteryGifts/PGF.cs (0) A PKHeX.Core/MysteryGifts/PGT.cs (0) A PKHeX.Core/MysteryGifts/PL6.cs (0)
A PKHeX.Core/MysteryGifts/WB7.cs (0) A PKHeX.Core/MysteryGifts/WC3.cs (0) A PKHeX.Core/MysteryGifts/WC6.cs (0) A PKHeX.Core/MysteryGifts/WC7.cs (0) A PKHeX.Core/MysteryGifts/WR7.cs (0) A PKHeX.Core/PKHeX.Core.csproj (0) A PKHeX.Core/PKM/BK4.cs (0) A PKHeX.Core/PKM/CK3.cs (0) A PKHeX.Core/PKM/PB7.cs (0) A PKHeX.Core/PKM/PK1.cs (0) A PKHeX.Core/PKM/PK2.cs (0) A PKHeX.Core/PKM/PK3.cs (0) A PKHeX.Core/PKM/PK4.cs (0) A PKHeX.Core/PKM/PK5.cs (0) A PKHeX.Core/PKM/PK6.cs (0) A PKHeX.Core/PKM/PK7.cs (0) A PKHeX.Core/PKM/PKM.cs (0) A PKHeX.Core/PKM/Searching/CloneDetectionMethod.cs (0) A PKHeX.Core/PKM/Searching/SearchComparison.cs (0) A PKHeX.Core/PKM/Searching/SearchSettings.cs (0) A PKHeX.Core/PKM/Searching/SearchUtil.cs (0) A PKHeX.Core/PKM/Shared/IAwakened.cs (0) A PKHeX.Core/PKM/Shared/IContestStats.cs (0) A PKHeX.Core/PKM/Shared/IGameValueLimit.cs (0) A PKHeX.Core/PKM/Shared/IGeoTrack.cs (0) A PKHeX.Core/PKM/Shared/IHyperTrain.cs (0) A PKHeX.Core/PKM/Shared/ILangNick.cs (0) A PKHeX.Core/PKM/Shared/IShadowPKM.cs (0) A PKHeX.Core/PKM/Shared/ITrainerID.cs (0) A PKHeX.Core/PKM/Shared/PokeList1.cs (0) A PKHeX.Core/PKM/Shared/PokeList2.cs (0) A PKHeX.Core/PKM/Shared/PokeListGB.cs (0) A PKHeX.Core/PKM/Shared/PokeListType.cs (0) A PKHeX.Core/PKM/Shared/QRPK7.cs (0) A PKHeX.Core/PKM/Shared/QRPKM.cs (0) A PKHeX.Core/PKM/Shared/_K12.cs (0) A PKHeX.Core/PKM/Shared/_K3.cs (0) A PKHeX.Core/PKM/Shared/_K4.cs (0) A PKHeX.Core/PKM/Shared/_K6.cs (0) A PKHeX.Core/PKM/Strings/StringConverter.cs (0) A PKHeX.Core/PKM/Strings/StringConverter12.cs (0) A PKHeX.Core/PKM/Strings/StringConverter2KOR.cs (0) A PKHeX.Core/PKM/Strings/StringConverter3.cs (0) A PKHeX.Core/PKM/Strings/StringConverter345.cs (0) A PKHeX.Core/PKM/Strings/StringConverter4.cs (0) A PKHeX.Core/PKM/Util/Experience.cs (0) A PKHeX.Core/PKM/Util/FormConverter.cs (0) A PKHeX.Core/PKM/Util/ItemConverter.cs (0) A PKHeX.Core/PKM/Util/PKMConverter.cs (0) A PKHeX.Core/PKM/Util/PKMSorting.cs (0) A PKHeX.Core/PKM/Util/PKX.cs (0) A PKHeX.Core/PKM/Util/QRMessageUtil.cs (0) Patch Links:https://github.com/mm201/pkmn-classic-framework/pull/71.patch https://github.com/mm201/pkmn-classic-framework/pull/71.diff — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
I've updated it to include the Nuget package, however I had to update the framework for GTS from 4.0 to 4.6 to install it, and I'm unsure if that will affect the compiled program any (the point I can get to in compilation with my setup is the same as it was without 4.6). I also made replaced the Ball Capsule method with a basic byte check on the data within pokemondpds.ashx.cs itself, so whenever new PKHex releases come out they can be installed without having to add a new method each time.
Edit: As for the Battle Tower, while it might not work in rejecting Pokemon as they are uploaded (I'd assume that there isn't a reject message for it) there can possibly be a background program that scans the Pokemon inside Battle Tower data as it receives them and simply deletes illegitimate entries (though it might be helpful to add some leeway here, since people can't always know for certain if their Pokemon are legit).
Just to let you know I haven't forgotten this, but I need to test it aggressively to be sure there aren't false positives and I want to get some admin functions in place first to assist with that.
I guess this solves #3?
Closing because the patches here have been superseded. Further discussion can continue in #3.
This is a quick attempt at implementing a legitimacy check using PKHex's Core, having both basic sanity checks and optional, but thorough legitimacy checks. However, since I don't have the hardware necessary to properly test the server (and even if I did my college blocks ports making testing difficult), I don't have a means to actually test this code, so it should be tested to make sure it does not cause compiler errors when running.
The version of the core used is the one present in PKHex's source on 9/3/2019, however it contains an extra method to specifically check for ball seals, as they could cause irremovable Pokemon if not checked for. The validation method is also currently only implemented for Gen IV, however it shouldn't take too much work to add to Gen V (the main difference is changing a 0 to a 1). Finally, the method for decrypting the encrypted data (PKX.DecryptArray45) may not actually work properly, as I normally used a method inherent to Shiny2+1/2 to decrypt data rather than PKHex's decryption method.
Also PKHex uses GPL 3 as its license, however I don't think that particular license would violate anything the current program uses.
(For the file changes: Discarding the addition of PKHex as a reference in the gts class, pokemondpds.ashx.cs was the only file modified)