2017-01-08 07:54:09 +00:00
|
|
|
|
namespace PKHeX.Core
|
2016-11-10 16:14:54 +00:00
|
|
|
|
{
|
|
|
|
|
public abstract class BattleVideo
|
|
|
|
|
{
|
|
|
|
|
public abstract PKM[] BattlePKMs { get; }
|
|
|
|
|
public abstract int Generation { get; }
|
|
|
|
|
|
2017-06-18 01:37:19 +00:00
|
|
|
|
public static BattleVideo GetVariantBattleVideo(byte[] data)
|
2016-11-10 16:14:54 +00:00
|
|
|
|
{
|
2017-06-18 01:37:19 +00:00
|
|
|
|
if (BV6.IsValid(data))
|
2016-11-10 16:14:54 +00:00
|
|
|
|
return new BV6(data);
|
2017-06-18 01:37:19 +00:00
|
|
|
|
if (BV7.IsValid(data))
|
2016-11-10 16:14:54 +00:00
|
|
|
|
return new BV7(data);
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
2017-06-18 01:37:19 +00:00
|
|
|
|
public static bool IsValid(byte[] data)
|
2016-11-10 16:14:54 +00:00
|
|
|
|
{
|
2017-06-18 01:37:19 +00:00
|
|
|
|
if (BV6.IsValid(data))
|
2016-11-10 16:14:54 +00:00
|
|
|
|
return true;
|
2017-06-18 01:37:19 +00:00
|
|
|
|
if (BV7.IsValid(data))
|
2016-11-10 16:14:54 +00:00
|
|
|
|
return true;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|