private void CreatesNpcFromXml() { XmlNodeList npcNodeList = _theBible.GetElementsByTagName("npc"); foreach (XmlNode npcNode in npcNodeList) { foreach (Location aLoc in _locations) { if (aLoc.FirstId == npcNode.ParentNode.Attributes["id"].Value.Split(',').First()) { NonPlayer npc = new NonPlayer(npcNode.Attributes["name"].Value, npcNode.Attributes["desc"].Value); npc.Location = aLoc; if (npcNode.Attributes["target"].Value == "yes") { npc.AddIdentifier("target"); _p.ManageTarget(npc); } } } } }
public void AddChar(NonPlayer chr) { PresentChar.Add(chr); }