public EquipStengthConf getEquipStengthConf(EquipData data) { SXML sXML = XMLMgr.instance.GetSXML("equip.equip_strengthen", "id==" + data.id.ToString()); sXML = sXML.GetNode("strengthen", "level==" + (data.lv + 1).ToString()); EquipStengthConf result = default(EquipStengthConf); result.id = data.id; result.lv = data.lv; bool flag = sXML != null; if (flag) { result.exp = sXML.getInt("strengthen_exp"); SXML sXML2 = XMLMgr.instance.GetSXML("equip.equip_strengthen", "id==" + data.id.ToString()); sXML2 = sXML2.GetNode("strengthen", "level==" + data.lv.ToString()); bool flag2 = data.lv != 0; if (flag2) { result.add = sXML2.getInt("addition"); } else { result.add = 0; } } SXML sXML3 = XMLMgr.instance.GetSXML("equip.equip_strengthen", "id==" + data.id.ToString()); sXML3 = sXML3.GetNode("strengthen", null); bool flag3 = sXML3 != null; if (flag3) { int num = 0; do { int @int = sXML3.getInt("strengthen_exp"); bool flag4 = sXML3.getInt("level") > data.lv; if (flag4) { num += @int; } result.maxlv = sXML3.getInt("level"); }while (sXML3.nextOne()); result.maxexp = num; } return(result); }
public EquipStengthConf getEquipStengthConf(EquipData data) { SXML s_xml = XMLMgr.instance.GetSXML("equip.equip_strengthen", "id==" + data.id.ToString()); s_xml = s_xml.GetNode("strengthen", "level==" + (data.lv + 1).ToString()); EquipStengthConf conf = new EquipStengthConf(); conf.id = data.id; conf.lv = data.lv; if (s_xml != null) { conf.exp = s_xml.getInt("strengthen_exp"); SXML bb = XMLMgr.instance.GetSXML("equip.equip_strengthen", "id==" + data.id.ToString()); bb = bb.GetNode("strengthen", "level==" + (data.lv).ToString()); if (data.lv != 0) { conf.add = bb.getInt("addition"); } else { conf.add = 0; } } SXML all_xml = XMLMgr.instance.GetSXML("equip.equip_strengthen", "id==" + data.id.ToString()); all_xml = all_xml.GetNode("strengthen", null); if (all_xml != null) { int all = 0; do { int needexp = all_xml.getInt("strengthen_exp"); if (all_xml.getInt("level") > data.lv) { all += needexp; } conf.maxlv = all_xml.getInt("level"); } while (all_xml.nextOne()); conf.maxexp = all; } return(conf); }