public override void LoadData(Dictionary<string, GameMasterNode> allNodes)
{
mEncounters = new Dictionary<string, string>();
mEncounterFiles = new List<GameMasterNode>();
mRarity = NodeFile.Json["rarity"].ToString();
mEncounters = JsonConvert.DeserializeObject<Dictionary<string, string>>(NodeFile.Json["encounters"].ToString());
int lastIndexOfSlash = NodeFile.Path.LastIndexOf('/');
string nodeFilePathWithoutFileName = NodeFile.Path.Substring(0, lastIndexOfSlash);
foreach (string filename in mEncounters.Values)
{
string absoluteFilePath = JsonHelper.GetFileFromFileJson(filename, nodeFilePathWithoutFileName);
GameMasterNode otherFile = null;
if (allNodes.TryGetValue(absoluteFilePath, out otherFile))
{
// this is a proper edge
otherFile.Owner = NodeFile;
mEncounterFiles.Add(otherFile);
}
}
}