Code formatting

Some stuff can be abstract / sealed.
This commit is contained in:
Kaphotics 2016-07-07 05:44:43 -07:00
parent 7fe2a56d21
commit ba6eec70ba
5 changed files with 7 additions and 6 deletions

View file

@ -3,7 +3,7 @@ using System.Text;
namespace PKHeX
{
public class PGF : MysteryGift
public sealed class PGF : MysteryGift
{
internal const int Size = 0xCC;
public override string Extension => ".pgf";

View file

@ -8,7 +8,7 @@ namespace PKHeX
* http://projectpokemon.org/forums/showthread.php?6524
* See also: http://tccphreak.shiny-clique.net/debugger/pcdfiles.htm
*/
public class PCD : MysteryGift
public sealed class PCD : MysteryGift
{
internal const int Size = 0x358; // 856
public override string Extension => ".pcd";
@ -85,7 +85,8 @@ namespace PKHeX
{
refreshData((byte[])(data?.Clone() ?? new byte[Size]));
}
public void refreshData(byte[] data)
private void refreshData(byte[] data)
{
byte[] ekdata = new byte[PKX.SIZE_4PARTY];
Array.Copy(data, 8, ekdata, 0, ekdata.Length);

View file

@ -4,7 +4,7 @@ using System.Text;
namespace PKHeX
{
public class WC6 : MysteryGift
public sealed class WC6 : MysteryGift
{
internal const int Size = 0x108;
internal const int SizeFull = 0x310;

View file

@ -24,6 +24,7 @@ namespace PKHeX
protected const int SIZE_AO = 0x50;
protected byte[] Data;
public abstract byte[] Write();
public abstract int HP { get; set; }
public abstract int ATK { get; set; }
public abstract int DEF { get; set; }
@ -75,7 +76,6 @@ namespace PKHeX
data[i / 8] |= (byte)(bits[i] ? 1 << (i&0x7) : 0);
return data;
}
public virtual byte[] Write() { return Data; }
// Data Manipulation
public int FormeIndex(int species, int forme)

View file

@ -291,7 +291,7 @@ namespace PKHeX
public abstract uint Money { get; set; }
public abstract int BoxCount { get; }
public abstract int PartyCount { get; protected set; }
public virtual int CurrentBox { get { return 0; } set { } }
public abstract int CurrentBox { get; set; }
public abstract string Extension { get; }
// Varied Methods