private static CheckResult VerifyEncounterLink(PKM pkm, EncounterLink enc) { // Should NOT be Fateful, and should be in Database if (enc == null) { return(new CheckResult(Severity.Invalid, V43, CheckIdentifier.Encounter)); } if (pkm.XY && !enc.XY) { return(new CheckResult(Severity.Invalid, V44, CheckIdentifier.Encounter)); } if (pkm.AO && !enc.ORAS) { return(new CheckResult(Severity.Invalid, V45, CheckIdentifier.Encounter)); } if (enc.Shiny != null && (bool)enc.Shiny ^ pkm.IsShiny) { return(new CheckResult(Severity.Invalid, V47, CheckIdentifier.Encounter)); } return(pkm.FatefulEncounter ? new CheckResult(Severity.Invalid, V48, CheckIdentifier.Encounter) : new CheckResult(Severity.Valid, V49, CheckIdentifier.Encounter)); }
private static CheckResult VerifyEncounterLink(PKM pkm, EncounterLink enc) { // Should NOT be Fateful, and should be in Database if (enc == null) { return(new CheckResult(Severity.Invalid, LLinkNone, CheckIdentifier.Encounter)); } if (pkm.XY && !enc.CanBeReceivedBy(GameVersion.XY)) { return(new CheckResult(Severity.Invalid, LLinkXY, CheckIdentifier.Encounter)); } if (pkm.AO && !enc.CanBeReceivedBy(GameVersion.ORAS)) { return(new CheckResult(Severity.Invalid, LLinkAO, CheckIdentifier.Encounter)); } if (pkm.IsShiny) { return(new CheckResult(Severity.Invalid, LLinkShiny, CheckIdentifier.Encounter)); } return(pkm.FatefulEncounter ? new CheckResult(Severity.Invalid, LLinkFateful, CheckIdentifier.Encounter) : new CheckResult(Severity.Valid, LLinkValid, CheckIdentifier.Encounter)); }