Exemple #1
0
        public void addData(WeaponData one)
        {
            SXML sXML = XMLMgr.instance.GetSXML("shadow_flare.shadow_flare", "id==" + one.id);
            bool flag = sXML != null;

            if (flag)
            {
                one.name      = sXML.getString("name");
                one.attrId    = sXML.getInt("attrId");
                one.levelList = new List <WeaponLevelData>();
                SXML node  = sXML.GetNode("level", null);
                bool flag2 = node != null;
                if (flag2)
                {
                    do
                    {
                        WeaponLevelData item = default(WeaponLevelData);
                        item.id  = node.getString("id");
                        item.que = node.getString("que");
                        one.levelList.Add(item);
                    }while (node.nextOne());
                }
            }
            this.weaponFace.Add(one.id, one);
        }
Exemple #2
0
        public void addData(WeaponData one)
        {
            SXML s_xml = XMLMgr.instance.GetSXML("shadow_flare.shadow_flare", "id==" + one.id);

            if (s_xml != null)
            {
                one.name      = s_xml.getString("name");
                one.attrId    = s_xml.getInt("attrId");
                one.levelList = new List <WeaponLevelData>();
                SXML s_level = s_xml.GetNode("level", null);

                if (s_level != null)
                {
                    do
                    {
                        WeaponLevelData levelData = new WeaponLevelData();
                        //这边要输入确定升级界面的等级来确定所要增加的攻击力
                        levelData.id  = s_level.getString("id");
                        levelData.que = s_level.getString("que");
                        one.levelList.Add(levelData);
                    } while (s_level.nextOne());
                }
            }
            weaponFace.Add(one.id, one);
        }