// 2 byte pad public VSBodyPart(BinaryReader reader) { HP = reader.ReadUInt16(); AGIBonus = reader.ReadSByte(); evasion = reader.ReadSByte(); // 1 byte pad reader.ReadByte(); blunt = reader.ReadSByte(); edged = reader.ReadSByte(); piercing = reader.ReadSByte(); Human = reader.ReadSByte(); Beast = reader.ReadSByte(); Undead = reader.ReadSByte(); Phantom = reader.ReadSByte(); Dragon = reader.ReadSByte(); Evil = reader.ReadSByte(); // 2 byte pad reader.ReadByte(); reader.ReadByte(); VSSkill[] skills = new VSSkill[4]; for (int i = 0; i < 4; i++) { skills[i] = new VSSkill(reader.ReadBytes(4)); } VSEquipDatas armorDatas = new VSEquipDatas(reader); byte armorMaterial = reader.ReadByte(); byte armorDropChance = reader.ReadByte(); // drop chance/255 reader.ReadByte(); // ? always 1 for armours? reader.ReadByte(); byte[] damageDistrib = reader.ReadBytes(6); // damage distribution % across each of six body parts reader.ReadByte(); reader.ReadByte(); }
public ZNDMonster(BinaryReader reader) { reader.ReadUInt16(); reader.ReadByte(); // location in table for 3d model special effect reader.ReadByte(); name = L10n.Translate(reader.ReadBytes(18)); HP = reader.ReadUInt16(); MP = reader.ReadUInt16(); STR = reader.ReadByte(); INT = reader.ReadByte(); AGI = reader.ReadByte(); reader.ReadByte(); reader.ReadByte(); reader.ReadByte(); // walking speed whilst carrrying crates, monster don't use this :D reader.ReadByte(); speed = reader.ReadByte(); reader.ReadByte(); reader.ReadByte(); reader.ReadByte(); reader.ReadByte(); reader.ReadByte(); // 0x10 reader.ReadByte(); // 0x11 reader.ReadByte(); reader.ReadByte(); reader.ReadByte(); reader.ReadByte(); reader.ReadByte(); reader.ReadByte(); VSEquipDatas weaponBladeDatas = new VSEquipDatas(reader); VSEquipDatas weaponGripDatas = new VSEquipDatas(reader); VSEquipDatas weaponGem1Datas = new VSEquipDatas(reader); VSEquipDatas weaponGem2Datas = new VSEquipDatas(reader); VSEquipDatas weaponGem3Datas = new VSEquipDatas(reader); byte weaponMaterial = reader.ReadByte(); byte weaponDropChance = reader.ReadByte(); // drop chance/255 reader.ReadByte(); reader.ReadByte(); string weaponName = L10n.Translate(reader.ReadBytes(18)); VSEquipDatas shieldDatas = new VSEquipDatas(reader); VSEquipDatas shieldGem1Datas = new VSEquipDatas(reader); VSEquipDatas shieldGem2Datas = new VSEquipDatas(reader); VSEquipDatas shieldGem3Datas = new VSEquipDatas(reader); byte shieldMaterial = reader.ReadByte(); byte shieldDropChance = reader.ReadByte(); // drop chance/255 reader.ReadByte(); reader.ReadByte(); VSEquipDatas accessoryDatas = new VSEquipDatas(reader); byte accessoryDropChance = reader.ReadByte(); // drop chance/255 reader.ReadByte(); reader.ReadByte(); reader.ReadByte(); VSBodyPart[] bodyParts = new VSBodyPart[6]; for (int i = 0; i < 6; i++) { bodyParts[i] = new VSBodyPart(reader); } MPDId = reader.ReadUInt32(); }