Exemplo n.º 1
0
        public a3_ygyiwuModel()
        {
            SXML        sXML     = XMLMgr.instance.GetSXML("accent_relic.relic", "carr==" + ModelBase <PlayerModel> .getInstance().profession);
            List <SXML> nodeList = sXML.GetNodeList("relic_god", "");

            for (int i = 0; i < nodeList.Count; i++)
            {
                yiwuInfo yiwuInfo = new yiwuInfo();
                yiwuInfo.id                     = nodeList[i].getInt("id");
                yiwuInfo.need_zdl               = nodeList[i].getInt("zdl");
                yiwuInfo.isGod                  = true;
                yiwuInfo.name                   = nodeList[i].getString("name");
                yiwuInfo.des                    = nodeList[i].getString("des");
                yiwuInfo.needexp                = nodeList[i].getInt("exp");
                yiwuInfo.place                  = nodeList[i].getString("place");
                yiwuInfo.awardName              = nodeList[i].getString("des1");
                yiwuInfo.awardDesc              = nodeList[i].getString("des2");
                yiwuInfo.iconid                 = nodeList[i].getInt("icon");
                yiwuInfo.awardId                = nodeList[i].GetNode("award", "").getInt("id");
                yiwuInfo.awardType              = nodeList[i].GetNode("award", "").getInt("type");
                yiwuInfo.eff                    = nodeList[i].getString("eff");
                yiwuInfo.fbBox_title            = nodeList[i].getString("title");
                yiwuInfo.fbBox_dec              = nodeList[i].getString("desc");
                this.Allywlist_God[yiwuInfo.id] = yiwuInfo;
            }
            List <SXML> sXMLList = XMLMgr.instance.GetSXMLList("accent_relic.relic", "type==" + 2);
            SXML        sXML2    = null;

            foreach (SXML current in sXMLList)
            {
                bool flag = current.getInt("carr") == ModelBase <PlayerModel> .getInstance().profession;

                if (flag)
                {
                    sXML2 = current;
                }
            }
            List <SXML> nodeList2 = sXML2.GetNodeList("relic_god", "");

            for (int j = 0; j < nodeList2.Count; j++)
            {
                yiwuInfo yiwuInfo2 = new yiwuInfo();
                yiwuInfo2.id                     = nodeList2[j].getInt("id");
                yiwuInfo2.need_zdl               = nodeList2[j].getInt("zdl");
                yiwuInfo2.isGod                  = false;
                yiwuInfo2.name                   = nodeList2[j].getString("name");
                yiwuInfo2.des                    = nodeList2[j].getString("des");
                yiwuInfo2.place                  = nodeList2[j].getString("place");
                yiwuInfo2.awardName              = nodeList2[j].getString("des1");
                yiwuInfo2.awardDesc              = nodeList2[j].getString("des2");
                yiwuInfo2.iconid                 = nodeList2[j].getInt("icon");
                yiwuInfo2.awardId                = nodeList2[j].GetNode("award", "").getInt("id");
                yiwuInfo2.awardType              = nodeList2[j].GetNode("award", "").getInt("type");
                yiwuInfo2.fbBox_title            = nodeList2[j].getString("title");
                yiwuInfo2.fbBox_dec              = nodeList2[j].getString("desc");
                yiwuInfo2.eff                    = nodeList2[j].getString("eff");
                yiwuInfo2.needuplvl              = nodeList2[j].getInt("zhuan");
                yiwuInfo2.needlvl                = nodeList2[j].getInt("level");
                this.Allywlist_Pre[yiwuInfo2.id] = yiwuInfo2;
            }
        }
        public uint studyTime       = 0; //研究剩余时间
        //public uint studyTime_all = 0;//研究下一等级总时间
        public a3_ygyiwuModel() : base()
        {
            SXML        xml  = XMLMgr.instance.GetSXML("accent_relic.relic", "carr==" + PlayerModel.getInstance().profession);
            List <SXML> info = xml.GetNodeList("relic_god");

            for (int i = 0; i < info.Count; i++)
            {
                yiwuInfo yiwuItem = new yiwuInfo();
                yiwuItem.id       = info[i].getInt("id");
                yiwuItem.need_zdl = info[i].getInt("zdl");
                yiwuItem.isGod    = true;
                yiwuItem.name     = info[i].getString("name");
                yiwuItem.des      = info[i].getString("des");
                yiwuItem.needexp  = info[i].getInt("exp");
                yiwuItem.place    = info[i].getString("place");

                yiwuItem.awardName         = info[i].getString("des1");
                yiwuItem.awardDesc         = info[i].getString("des2");
                yiwuItem.iconid            = info[i].getInt("icon");
                yiwuItem.awardId           = info[i].GetNode("award").getInt("id");
                yiwuItem.awardType         = info[i].GetNode("award").getInt("type");
                yiwuItem.eff               = info[i].getString("eff");
                yiwuItem.fbBox_title       = info[i].getString("title");
                yiwuItem.fbBox_dec         = info[i].getString("desc");
                Allywlist_God[yiwuItem.id] = yiwuItem;
            }
            List <SXML> Pre_xml_list = XMLMgr.instance.GetSXMLList("accent_relic.relic", "type==" + 2);
            SXML        Pre_xml      = null;

            foreach (SXML l in Pre_xml_list)
            {
                if (l.getInt("carr") == PlayerModel.getInstance().profession)
                {
                    Pre_xml = l;
                }
            }
            List <SXML> info_pre = Pre_xml.GetNodeList("relic_god");

            for (int i = 0; i < info_pre.Count; i++)
            {
                yiwuInfo yiwuItem = new yiwuInfo();
                yiwuItem.id          = info_pre[i].getInt("id");
                yiwuItem.need_zdl    = info_pre[i].getInt("zdl");
                yiwuItem.isGod       = false;
                yiwuItem.name        = info_pre[i].getString("name");
                yiwuItem.des         = info_pre[i].getString("des");
                yiwuItem.place       = info_pre[i].getString("place");
                yiwuItem.awardName   = info_pre[i].getString("des1");
                yiwuItem.awardDesc   = info_pre[i].getString("des2");
                yiwuItem.iconid      = info_pre[i].getInt("icon");
                yiwuItem.awardId     = info_pre[i].GetNode("award").getInt("id");
                yiwuItem.awardType   = info_pre[i].GetNode("award").getInt("type");
                yiwuItem.fbBox_title = info_pre[i].getString("title");
                yiwuItem.fbBox_dec   = info_pre[i].getString("desc");
                yiwuItem.eff         = info_pre[i].getString("eff");
                yiwuItem.needuplvl   = info_pre[i].getInt("zhuan");
                yiwuItem.needlvl     = info_pre[i].getInt("level");

                Allywlist_Pre[yiwuItem.id] = yiwuItem;
            }
        }