예제 #1
0
    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);
    }
예제 #2
0
    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);
    }
예제 #3
0
 private ItemDataAll getItemFromParent(ItemDataAll data, int itemID)
 {
     return(data.parentItems[itemID - data.startIndex]);
 }
예제 #4
0
 public static ItemDataAll getChild(this ItemDataAll data, int itemID)
 {
     return(null);
 }