public MonsterInfo() { Name = "Unnamed"; Hp = new byte[4]; Str = new byte[4]; Mag = new byte[4]; Vit = new byte[4]; Spr = new byte[4]; Spd = new byte[4]; Eva = new byte[4]; AbilitiesLow = new Ability[16]; AbilitiesMed = new Ability[16]; AbilitiesHigh = new Ability[16]; DrawLow = new byte[4]; DrawMed = new byte[4]; DrawHigh = new byte[4]; MugLow = new HeldItem[4]; MugMed = new HeldItem[4]; MugHigh = new HeldItem[4]; DropLow = new HeldItem[4]; DropMed = new HeldItem[4]; DropHigh = new HeldItem[4]; MysteryData = new byte[16]; ElemDef = new byte[8]; StatusDef = new byte[20]; }
public MonsterInfo(byte[] data) : this() { using (var stream = new MemoryStream(data)) using (var reader = new BinaryReader(stream)) { Name = FF8String.Decode(reader.ReadBytes(24)); Hp = reader.ReadBytes(4); Str = reader.ReadBytes(4); Vit = reader.ReadBytes(4); Mag = reader.ReadBytes(4); Spr = reader.ReadBytes(4); Spd = reader.ReadBytes(4); Eva = reader.ReadBytes(4); for (int i = 0; i < 16; i++) { AbilitiesLow[i] = new Ability(reader.ReadBytes(4)); } for (int i = 0; i < 16; i++) { AbilitiesMed[i] = new Ability(reader.ReadBytes(4)); } for (int i = 0; i < 16; i++) { AbilitiesHigh[i] = new Ability(reader.ReadBytes(4)); } MedStart = reader.ReadByte(); HighStart = reader.ReadByte(); MysteryFlags1 = reader.ReadByte(); StatusFlags1 = reader.ReadByte(); CardDrop = reader.ReadByte(); CardMorph = reader.ReadByte(); CardRareMorph = reader.ReadByte(); DevourLow = reader.ReadByte(); DevourMed = reader.ReadByte(); DevourHigh = reader.ReadByte(); StatusFlags2 = reader.ReadByte(); MysteryFlags2 = reader.ReadByte(); ExtraExp = reader.ReadUInt16(); Exp = reader.ReadUInt16(); for (int i = 0; i < 4; i++) { DrawLow[i] = reader.ReadByte(); reader.ReadByte(); // padding } for (int i = 0; i < 4; i++) { DrawMed[i] = reader.ReadByte(); reader.ReadByte(); // padding } for (int i = 0; i < 4; i++) { DrawHigh[i] = reader.ReadByte(); reader.ReadByte(); // padding } for (int i = 0; i < 4; i++) { MugLow[i] = new HeldItem(reader.ReadBytes(2)); } for (int i = 0; i < 4; i++) { MugMed[i] = new HeldItem(reader.ReadBytes(2)); } for (int i = 0; i < 4; i++) { MugHigh[i] = new HeldItem(reader.ReadBytes(2)); } for (int i = 0; i < 4; i++) { DropLow[i] = new HeldItem(reader.ReadBytes(2)); } for (int i = 0; i < 4; i++) { DropMed[i] = new HeldItem(reader.ReadBytes(2)); } for (int i = 0; i < 4; i++) { DropHigh[i] = new HeldItem(reader.ReadBytes(2)); } MugRate = reader.ReadByte(); DropRate = reader.ReadByte(); reader.ReadByte(); // padding Ap = reader.ReadByte(); MysteryData = reader.ReadBytes(16); ElemDef = reader.ReadBytes(8); StatusDef = reader.ReadBytes(20); } }