public static CraftHeader ReadHeader(this Stream fs) { var result = new CraftHeader(); result.RealmData = new CraftHeader.CraftRealmData[CraftHeader.RealmCount]; result.Version = fs.ReadUint(); result.NameListSize = fs.ReadUint(); result.NumberOfNames = fs.ReadUint(); result.NameListOffset = fs.ReadUint(); for (int c = 0; c < CraftHeader.RealmCount; c++) { var realm = new CraftHeader.CraftRealmData(); realm.NumberOfRecipes = fs.ReadUint(); realm.NumberOfCategories = fs.ReadUint(); realm.RecipeListOffset = fs.ReadUint(); realm.CategoryListOffset = fs.ReadUint(); realm.ProfessionListOffset = fs.ReadUint(); result.RealmData[c] = realm; } return(result); }
public static CraftHeader ReadHeader(this Stream fs) { var result = new CraftHeader(); result.RealmData = new CraftHeader.CraftRealmData[CraftHeader.RealmCount]; result.Version = fs.ReadUint(); result.NameListSize = fs.ReadUint(); result.NumberOfNames = fs.ReadUint(); result.NameListOffset = fs.ReadUint(); for (int c = 0 ; c < CraftHeader.RealmCount ; c++) { var realm = new CraftHeader.CraftRealmData(); realm.NumberOfRecipes = fs.ReadUint(); realm.NumberOfCategories = fs.ReadUint(); realm.RecipeListOffset = fs.ReadUint(); realm.CategoryListOffset = fs.ReadUint(); realm.ProfessionListOffset = fs.ReadUint(); result.RealmData[c] = realm; } return result; }