public ItemVariables getMobStats(int mobID) { if (itemValues.ContainsKey(mobID)) { return(itemValues[mobID]); } FileInfo file = this.directory.getFileContainingString(mobID); StreamReader reader = file.OpenText(); string fileContents = ""; string line = ""; while ((line = reader.ReadLine()) != null) { fileContents += line + Environment.NewLine; } reader.Close(); ItemDataAll ItemDataAll = mobDataConverter(mobID, fileContents); ItemVariables variables = ItemDataAll.generateVariables(); itemValues.Add(mobID, variables); return(variables); }
public ItemVariables getItemStats(int itemID) { if (itemValues.ContainsKey(itemID)) { return(itemValues[itemID]); } FileInfo file = this.directory.getFileContainingString(itemID); StreamReader reader = file.OpenText(); string fileContents = ""; string line = ""; while ((line = reader.ReadLine()) != null) { fileContents += line + Environment.NewLine; } reader.Close(); ItemDataAll ItemDataAll = itemDataConverter(itemID, fileContents); //Debug.Log("ITEM ID!!!: " + itemID); ItemVariables variables = ItemDataAll.generateVariables(); itemValues.Add(itemID, variables); Debug.Log("dictionary size: " + itemValues.Count); return(variables); }
private ItemDataAll getItemFromParent(ItemDataAll data, int itemID) { return(data.parentItems[itemID - data.startIndex]); }
public static ItemDataAll getChild(this ItemDataAll data, int itemID) { return(null); }