public void Read(GDFileReader file) { Block b = new Block(); if (file.ReadBlockStart(b) != 4) { throw new Exception(); } var version = file.ReadInt(); if (version == 6) // version { stashPages = GDArray <StashPage> .Read(file); } else if (version == 5) { stashPages = new List <StashPage>(); var width = file.ReadInt(); var height = file.ReadInt(); var items = GDArray <StashItem> .Read(file); stashPages.Add(new StashPage() { width = width, height = height, items = items }); } else { throw new Exception("Invalid stash version."); } file.ReadBlockEnd(b); }
public void Read(GDFileReader file) { Block b = new Block(); if (file.ReadBlockStart(b) != 5) { throw new Exception(); } if (file.ReadInt() != 1) // version { throw new Exception(); } for (var i = 0; i < 3; i++) { uids[i] = GDArray <Uid> .Read(file); } for (var i = 0; i < 3; i++) { spawn[i] = new Uid(); spawn[i].Read(file); } file.ReadBlockEnd(b); }
public void Read(GDFileReader file) { Block b = new Block(); if (file.ReadBlockStart(b) != 0) { throw new Exception(); } tempBool = file.ReadByte(); Items = GDArray <InventoryItem> .Read(file); file.ReadBlockEnd(b); }
public override void Read(GDFileReader file) { Block b = new Block(); if (file.ReadBlockStart(b) != 0) { throw new Exception(); } width = file.ReadInt(); height = file.ReadInt(); items = GDArray <StashItem> .Read(file); file.ReadBlockEnd(b); }
public void Read(GDFileReader file) { Block b = new Block(); if (file.ReadBlockStart(b) != 13) { throw new Exception(); } if (file.ReadInt() != 5) // version { throw new Exception(); } faction = file.ReadInt(); factions = GDArray <FactionData> .Read(file); file.ReadBlockEnd(b); }
public void Read(GDFileReader file) { Block b = new Block(); if (file.ReadBlockStart(b) != 8) { throw new Exception(); } if (file.ReadInt() != 5) // version { throw new Exception(); } skills = GDArray <Skill> .Read(file); masteriesAllowed = file.ReadInt(); skillReclamationPointsUsed = file.ReadInt(); devotionReclamationPointsUsed = file.ReadInt(); itemSkills = GDArray <ItemSkill> .Read(file); file.ReadBlockEnd(b); }