Ejemplo n.º 1
0
 public void ParseXML(XML.XMLNode x)
 {
     foreach (XMLNode node in x.SelectList("equiptype"))
     {
         EquipType et    = node.SelectEnum <EquipType>("type");
         int       slots = node.SelectInt("slots", 1);
         equipSlots.Add(et, new EquipSlot(slots));
         filterSlots.Add(et);
     }
 }
Ejemplo n.º 2
0
    public void ParseXML(XML.XMLNode node)
    {
        Name        = node.SelectString("name");
        minNumItems = node.SelectInt("min", 0);
        maxNumItems = node.SelectInt("max", 1);

        foreach (XML.XMLNode x in node.SelectList("entry"))
        {
            string     item        = x.SelectString("item");
            double     probability = x.SelectDouble("probability");
            int        count       = x.SelectInt("count");
            int        level       = x.SelectInt("level");
            ItemHolder ih          = new ItemHolder(item, count);
            Add(ih, probability, false, (ushort)level);
        }
        foreach (XML.XMLNode x in node.SelectList("ref"))
        {
            refs.Add(x.SelectString("name"));
        }
    }
Ejemplo n.º 3
0
 public void ParseXML(XML.XMLNode x)
 {
     foreach (XMLNode node in x.SelectList("spell"))
     {
         string spellName = node.SelectString("name");
         Spell  s         = node.Select <Spell>();
         this.Add(spellName, s);
         if (!BigBoss.Objects.PlayerSpells.ContainsKey(spellName)) //this is givin' us every spell for the time being, should be removed when Player is properly parsed
         {
             BigBoss.Objects.PlayerSpells.Add(spellName, s);
         }
     }
 }