Example #1
0
        public void getWeaponUpgradeDataById(int id)
        {
            SXML sXML = XMLMgr.instance.GetSXML("shadow_flare.upgrade_exp", "id==" + id);
            WeaponUpgradeData weaponUpgradeData = default(WeaponUpgradeData);

            weaponUpgradeData.id = id;
            bool flag = sXML != null;

            if (flag)
            {
                weaponUpgradeData.expList = new List <UpgradeLevelData>();
                SXML node  = sXML.GetNode("level", null);
                bool flag2 = node != null;
                if (flag2)
                {
                    do
                    {
                        UpgradeLevelData item = default(UpgradeLevelData);
                        item.id  = node.getInt("id");
                        item.exp = node.getInt("exp");
                        weaponUpgradeData.expList.Add(item);
                    }while (node.nextOne());
                }
            }
            this.upgradeData[weaponUpgradeData.id] = weaponUpgradeData;
        }
Example #2
0
        public void getWeaponUpgradeDataById(int id)
        {
            SXML s_xml = XMLMgr.instance.GetSXML("shadow_flare.upgrade_exp", "id==" + id);

            WeaponUpgradeData data = new WeaponUpgradeData();

            data.id = id;

            if (s_xml != null)
            {
                data.expList = new List <UpgradeLevelData>();
                SXML s_upgrade = s_xml.GetNode("level", null);
                if (s_upgrade != null)
                {
                    do
                    {
                        UpgradeLevelData upgradeDatas = new UpgradeLevelData();
                        upgradeDatas.id  = s_upgrade.getInt("id");
                        upgradeDatas.exp = s_upgrade.getInt("exp");
                        data.expList.Add(upgradeDatas);
                    } while (s_upgrade.nextOne());
                }
            }
            //upgradeData.Add(data.id, data);
            upgradeData[data.id] = data;
        }