PKHeX/PKHeX.Core/Ribbons/IRibbonSetMemory6.cs
Kurt 26b1453002 Narrow ribbon count type from int->byte, split interface
Fix RibbonVerifier4 not checking gen4 contest ribbons correctly
Split IRibbonCommon6 to have memory ribbons separate, as they are not implemented in mystery gifts. Also, we can add the boolean flags to the interface, and check that the boolean is set if count is nonzero.
Fix adding ribbons to Gen8 gift templates
Improve Gen8 template ribbon fetch (no closure, faster IndexOf)
2022-08-23 21:25:22 -07:00

20 lines
678 B
C#

namespace PKHeX.Core;
public interface IRibbonSetMemory6
{
byte RibbonCountMemoryContest { get; set; }
byte RibbonCountMemoryBattle { get; set; }
bool HasContestMemoryRibbon { get; set; }
bool HasBattleMemoryRibbon { get; set; }
}
internal static partial class RibbonExtensions
{
internal static void CopyRibbonSetMemory6(this IRibbonSetMemory6 set, IRibbonSetMemory6 dest)
{
dest.RibbonCountMemoryContest = set.RibbonCountMemoryContest;
dest.RibbonCountMemoryBattle = set.RibbonCountMemoryBattle;
dest.HasContestMemoryRibbon = set.HasContestMemoryRibbon;
dest.HasBattleMemoryRibbon = set.HasBattleMemoryRibbon;
}
}