mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-22 03:53:08 +00:00
Update BallApplicator.cs
This commit is contained in:
parent
ceb669c112
commit
076bbbbd77
1 changed files with 4 additions and 1 deletions
|
@ -88,8 +88,11 @@ public static class BallApplicator
|
|||
return ApplyFirstLegalBall(pk, balls, []);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="ApplyBallLegalByColor(PKM, IEncounterTemplate, PersonalColor)"/>
|
||||
public static byte ApplyBallLegalByColor(PKM pk) => ApplyBallLegalByColor(pk, PersonalColorUtil.GetColor(pk));
|
||||
/// <inheritdoc cref="ApplyBallLegalByColor(PKM, IEncounterTemplate, PersonalColor)"/>
|
||||
public static byte ApplyBallLegalByColor(PKM pk, PersonalColor color) => ApplyBallLegalByColor(pk, new LegalityAnalysis(pk), color);
|
||||
/// <inheritdoc cref="ApplyBallLegalByColor(PKM, IEncounterTemplate, PersonalColor)"/>
|
||||
public static byte ApplyBallLegalByColor(PKM pk, LegalityAnalysis la, PersonalColor color) => ApplyBallLegalByColor(pk, la.EncounterOriginal, color);
|
||||
|
||||
/// <summary>
|
||||
|
@ -98,7 +101,7 @@ public static class BallApplicator
|
|||
/// <param name="pk">Pokémon to modify.</param>
|
||||
/// <param name="enc">Encounter matched to.</param>
|
||||
/// <param name="color">Color preference to order by.</param>
|
||||
private static byte ApplyBallLegalByColor(PKM pk, IEncounterTemplate enc, PersonalColor color)
|
||||
public static byte ApplyBallLegalByColor(PKM pk, IEncounterTemplate enc, PersonalColor color)
|
||||
{
|
||||
Span<Ball> balls = stackalloc Ball[MaxBallSpanAlloc];
|
||||
var count = GetLegalBalls(balls, pk, enc);
|
||||
|
|
Loading…
Reference in a new issue