public void WriteData(byte[] bytes) { LasersFired.CopyToByteArrayLE(bytes, 1908); LaserCraftHits.CopyToByteArrayLE(bytes, 1912); WarheadsFired.CopyToByteArrayLE(bytes, 1920); WarheadHits.CopyToByteArrayLE(bytes, 1922); CraftLost.CopyToByteArrayLE(bytes, 1926); TotalKills.CopyToByteArrayLE(bytes, 1626); TotalCaptures.CopyToByteArrayLE(bytes, 1628); int firstKillsOffset = 1632; int countMultiplier = 0; foreach (NPCShipType npcShip in Enum.GetValues(typeof(NPCShipType))) { BattleVictoriesList[(int)npcShip].Victories.CopyToByteArrayLE(bytes, firstKillsOffset + countMultiplier); countMultiplier += 2; } }
public void WriteData(byte[] bytes) { TotalSurfaceVictories.CopyToByteArrayLE(bytes, 1587); LasersFired.CopyToByteArrayLE(bytes, 1685); LaserCraftHits.CopyToByteArrayLE(bytes, 1689); LaserGroundHits.CopyToByteArrayLE(bytes, 1693); MisslesFired.CopyToByteArrayLE(bytes, 1697); MissleCraftHits.CopyToByteArrayLE(bytes, 1699); MissleGroundHits.CopyToByteArrayLE(bytes, 1701); CraftLost.CopyToByteArrayLE(bytes, 1703); int firstKillsOffset = 1589; int firstCapturesOffset = 1637; int countMultiplier = 0; foreach (NPCShipType npcShip in Enum.GetValues(typeof(NPCShipType))) { TODVictoriesCapturesList[(int)npcShip].Victories.CopyToByteArrayLE(bytes, firstKillsOffset + countMultiplier); TODVictoriesCapturesList[(int)npcShip].Captures.CopyToByteArrayLE(bytes, firstCapturesOffset + countMultiplier); countMultiplier += 2; } }