|
@@ -49,7 +49,7 @@ public class Data
|
|
|
{
|
|
|
XmlNode xmlNode;
|
|
|
XmlAttribute xmlAttribute;
|
|
|
-
|
|
|
+
|
|
|
#region MyRegion
|
|
|
|
|
|
PlayerNode.SelectSingleNode("Coin").Attributes[0].Value = ManaData.Coin.ToString("0");
|
|
@@ -61,76 +61,114 @@ public class Data
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
- #region Skill
|
|
|
+ #region SkillList
|
|
|
|
|
|
- #region Skill
|
|
|
-
|
|
|
- xmlNode = PlayerNode.SelectSingleNode("Skill");
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("SkillList");
|
|
|
xmlNode.RemoveAll();
|
|
|
for (int i = 0; i < ManaData.SkillList.Count; i++)
|
|
|
{
|
|
|
- xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, ManaData.SkillList[i].Name, ""));
|
|
|
+ if (ManaData.SkillList[i].SkillCato == SkillCato.Skill)
|
|
|
+ {
|
|
|
+ #region Skill
|
|
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("status"));
|
|
|
- xmlAttribute.Value = ManaData.SkillList[i].ItemSkillStatus.ToString();
|
|
|
+ Skill skill = (Skill) ManaData.SkillList[i];
|
|
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("level"));
|
|
|
- xmlAttribute.Value = ManaData.SkillList[i].Level.ToString();
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, skill.Name, ""));
|
|
|
|
|
|
- xmlNode = PlayerNode.SelectSingleNode("Skill");
|
|
|
- }
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillCato"));
|
|
|
+ xmlAttribute.Value = skill.SkillCato.ToString();
|
|
|
|
|
|
- #endregion
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
|
|
|
+ xmlAttribute.Value = skill.ItemSkillStatus.ToString();
|
|
|
|
|
|
- #region Ability
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
|
|
|
+ xmlAttribute.Value = skill.Level.ToString();
|
|
|
|
|
|
- xmlNode = PlayerNode.SelectSingleNode("Ability");
|
|
|
- xmlNode.RemoveAll();
|
|
|
- for (int i = 0; i < ManaData.AbilityList.Count; i++)
|
|
|
- {
|
|
|
- xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, ManaData.AbilityList[i].Name, ""));
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("CdTimer"));
|
|
|
+ xmlAttribute.Value = skill.CdTimer.ToString();
|
|
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("status"));
|
|
|
- xmlAttribute.Value = ManaData.AbilityList[i].ItemSkillStatus.ToString();
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("EffectTimer"));
|
|
|
+ xmlAttribute.Value = skill.EffectTimer.ToString();
|
|
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("level"));
|
|
|
- xmlAttribute.Value = ManaData.AbilityList[i].Level.ToString();
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("SkillList");
|
|
|
|
|
|
- xmlNode = PlayerNode.SelectSingleNode("Ability");
|
|
|
- }
|
|
|
+ #endregion
|
|
|
+ }
|
|
|
+ else if (ManaData.SkillList[i].SkillCato == SkillCato.Pack)
|
|
|
+ {
|
|
|
+ #region Pack
|
|
|
|
|
|
- #endregion
|
|
|
+ Pack pack = (Pack)ManaData.SkillList[i];
|
|
|
|
|
|
- #region BigSkill
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "礼包", ""));
|
|
|
|
|
|
- xmlNode = PlayerNode.SelectSingleNode("BigSkill");
|
|
|
- xmlNode.RemoveAll();
|
|
|
- for (int i = 0; i < ManaData.BigSkillList.Count; i++)
|
|
|
- {
|
|
|
- xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, ManaData.BigSkillList[i].Name, ""));
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillCato"));
|
|
|
+ xmlAttribute.Value = pack.SkillCato.ToString();
|
|
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("status"));
|
|
|
- xmlAttribute.Value = ManaData.BigSkillList[i].ItemSkillStatus.ToString();
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Name"));
|
|
|
+ xmlAttribute.Value = pack.Name;
|
|
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("level"));
|
|
|
- xmlAttribute.Value = ManaData.BigSkillList[i].Level.ToString();
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
|
|
|
+ xmlAttribute.Value = pack.ItemSkillStatus.ToString();
|
|
|
|
|
|
- xmlNode = PlayerNode.SelectSingleNode("BigSkill");
|
|
|
- }
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
|
|
|
+ xmlAttribute.Value = pack.Level.ToString();
|
|
|
|
|
|
- #endregion
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("SkillList");
|
|
|
|
|
|
- #endregion
|
|
|
+ #endregion
|
|
|
+ }
|
|
|
+ else if (ManaData.SkillList[i].SkillCato == SkillCato.Ability)
|
|
|
+ {
|
|
|
+ #region Ability
|
|
|
|
|
|
- #region CoolList
|
|
|
+ Ability ability = (Ability)ManaData.SkillList[i];
|
|
|
|
|
|
- xmlNode = PlayerNode.SelectSingleNode("CoolList");
|
|
|
- xmlNode.RemoveAll();
|
|
|
- for (int i = 0; i < ManaData.CoolList.Count; i++)
|
|
|
- {
|
|
|
- xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, ManaData.CoolList[i].Name, ""));
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, ability.Name, ""));
|
|
|
+
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillCato"));
|
|
|
+ xmlAttribute.Value = ability.SkillCato.ToString();
|
|
|
+
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
|
|
|
+ xmlAttribute.Value = ability.ItemSkillStatus.ToString();
|
|
|
+
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
|
|
|
+ xmlAttribute.Value = ability.Level.ToString();
|
|
|
+
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("SkillList");
|
|
|
+
|
|
|
+ #endregion
|
|
|
+ }
|
|
|
+ else if (ManaData.SkillList[i].SkillCato == SkillCato.BigSkill)
|
|
|
+ {
|
|
|
+ #region BigSkill
|
|
|
+
|
|
|
+ BigSkill bigSkill = (BigSkill) ManaData.SkillList[i];
|
|
|
|
|
|
- xmlNode = PlayerNode.SelectSingleNode("CoolList");
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, bigSkill.Name, ""));
|
|
|
+
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillCato"));
|
|
|
+ xmlAttribute.Value = bigSkill.SkillCato.ToString();
|
|
|
+
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
|
|
|
+ xmlAttribute.Value = bigSkill.ItemSkillStatus.ToString();
|
|
|
+
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("BarStatus"));
|
|
|
+ xmlAttribute.Value = bigSkill.BarSkillStatus.ToString();
|
|
|
+
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
|
|
|
+ xmlAttribute.Value = bigSkill.Level.ToString();
|
|
|
+
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("CdTimer"));
|
|
|
+ xmlAttribute.Value = bigSkill.CdTimer.ToString();
|
|
|
+
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("EffectTimer"));
|
|
|
+ xmlAttribute.Value = bigSkill.EffectTimer.ToString();
|
|
|
+
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("SkillList");
|
|
|
+
|
|
|
+ #endregion
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
@@ -151,15 +189,22 @@ public class Data
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
- #region ProcessorList
|
|
|
+ #region FlowerList
|
|
|
|
|
|
- xmlNode = PlayerNode.SelectSingleNode("ProcessorList");
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("FlowerList");
|
|
|
xmlNode.RemoveAll();
|
|
|
- for (int i = 0; i < ManaData.ProcessorList.Count; i++)
|
|
|
+
|
|
|
+ foreach (var kv in ManaGarden.FlowerDic)
|
|
|
{
|
|
|
- xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, ManaData.ProcessorList[i].Name, ""));
|
|
|
+ if (kv.Value.Unlock)
|
|
|
+ {
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "Flower", ""));
|
|
|
+
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Id"));
|
|
|
+ xmlAttribute.Value = kv.Value.Id.ToString();
|
|
|
|
|
|
- xmlNode = PlayerNode.SelectSingleNode("ProcessorList");
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("FlowerList");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
@@ -170,6 +215,7 @@ public class Data
|
|
|
public static void ResetPlayerConfig()
|
|
|
{
|
|
|
XmlNode xmlNode;
|
|
|
+ XmlAttribute xmlAttribute;
|
|
|
|
|
|
#region MyRegion
|
|
|
|
|
@@ -182,50 +228,115 @@ public class Data
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
- #region Skill
|
|
|
+ #region SkillList
|
|
|
|
|
|
- #region Skill
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("SkillList");
|
|
|
+ xmlNode.RemoveAll();
|
|
|
+ for (int i = 0; i < ManaData.SkillList.Count; i++)
|
|
|
+ {
|
|
|
+ if (ManaData.SkillList[i].SkillCato == SkillCato.Skill)
|
|
|
+ {
|
|
|
+ #region Skill
|
|
|
|
|
|
- xmlNode = PlayerNode.SelectSingleNode("Skill");
|
|
|
+ Skill skill = (Skill)ManaData.SkillList[i];
|
|
|
|
|
|
- for (int i = 0; i < xmlNode.ChildNodes.Count; i++)
|
|
|
- {
|
|
|
- xmlNode.ChildNodes[i].Attributes[0].Value = "Lock";
|
|
|
- xmlNode.ChildNodes[i].Attributes[1].Value = "0";
|
|
|
- }
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, skill.Name, ""));
|
|
|
|
|
|
- #endregion
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillCato"));
|
|
|
+ xmlAttribute.Value = skill.SkillCato.ToString();
|
|
|
|
|
|
- #region Ability
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
|
|
|
+ xmlAttribute.Value = SkillStatus.Lock.ToString();
|
|
|
|
|
|
- xmlNode = PlayerNode.SelectSingleNode("Ability");
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
|
|
|
+ xmlAttribute.Value = 0.ToString();
|
|
|
|
|
|
- for (int i = 0; i < xmlNode.ChildNodes.Count; i++)
|
|
|
- {
|
|
|
- xmlNode.ChildNodes[i].Attributes[0].Value = "Lock";
|
|
|
- xmlNode.ChildNodes[i].Attributes[1].Value = "0";
|
|
|
- }
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("CdTimer"));
|
|
|
+ xmlAttribute.Value = 0.ToString();
|
|
|
|
|
|
- #endregion
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("EffectTimer"));
|
|
|
+ xmlAttribute.Value = 0.ToString();
|
|
|
|
|
|
- #region BigSkill
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("SkillList");
|
|
|
|
|
|
- xmlNode = PlayerNode.SelectSingleNode("BigSkill");
|
|
|
+ #endregion
|
|
|
+ }
|
|
|
+ else if (ManaData.SkillList[i].SkillCato == SkillCato.Pack)
|
|
|
+ {
|
|
|
+ #region Pack
|
|
|
|
|
|
- for (int i = 0; i < xmlNode.ChildNodes.Count; i++)
|
|
|
- {
|
|
|
- xmlNode.ChildNodes[i].Attributes[0].Value = "Lock";
|
|
|
- xmlNode.ChildNodes[i].Attributes[1].Value = "0";
|
|
|
- }
|
|
|
+ Pack pack = (Pack) ManaData.SkillList[i];
|
|
|
|
|
|
- #endregion
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "礼包", ""));
|
|
|
|
|
|
- #endregion
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillCato"));
|
|
|
+ xmlAttribute.Value = pack.SkillCato.ToString();
|
|
|
|
|
|
- #region CoolList
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Name"));
|
|
|
+ xmlAttribute.Value = pack.Name;
|
|
|
|
|
|
- xmlNode = PlayerNode.SelectSingleNode("CoolList");
|
|
|
- xmlNode.RemoveAll();
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
|
|
|
+ xmlAttribute.Value = SkillStatus.Lock.ToString();
|
|
|
+
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
|
|
|
+ xmlAttribute.Value = 0.ToString();
|
|
|
+
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("SkillList");
|
|
|
+
|
|
|
+ #endregion
|
|
|
+ }
|
|
|
+ else if (ManaData.SkillList[i].SkillCato == SkillCato.Ability)
|
|
|
+ {
|
|
|
+ #region Ability
|
|
|
+
|
|
|
+ Ability ability = (Ability)ManaData.SkillList[i];
|
|
|
+
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, ability.Name, ""));
|
|
|
+
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillCato"));
|
|
|
+ xmlAttribute.Value = ability.SkillCato.ToString();
|
|
|
+
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
|
|
|
+ xmlAttribute.Value = SkillStatus.Lock.ToString();
|
|
|
+
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
|
|
|
+ xmlAttribute.Value = 0.ToString();
|
|
|
+
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("SkillList");
|
|
|
+
|
|
|
+ #endregion
|
|
|
+ }
|
|
|
+ else if (ManaData.SkillList[i].SkillCato == SkillCato.BigSkill)
|
|
|
+ {
|
|
|
+ #region BigSkill
|
|
|
+
|
|
|
+ BigSkill bigSkill = (BigSkill)ManaData.SkillList[i];
|
|
|
+
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, bigSkill.Name, ""));
|
|
|
+
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillCato"));
|
|
|
+ xmlAttribute.Value = bigSkill.SkillCato.ToString();
|
|
|
+
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
|
|
|
+ xmlAttribute.Value = SkillStatus.Lock.ToString();
|
|
|
+
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("BarStatus"));
|
|
|
+ xmlAttribute.Value = SkillStatus.Buy.ToString();
|
|
|
+
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
|
|
|
+ xmlAttribute.Value = 0.ToString();
|
|
|
+
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("CdTimer"));
|
|
|
+ xmlAttribute.Value = 0.ToString();
|
|
|
+
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("EffectTimer"));
|
|
|
+ xmlAttribute.Value = 0.ToString();
|
|
|
+
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("SkillList");
|
|
|
+
|
|
|
+ #endregion
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
#endregion
|
|
|
|
|
@@ -234,13 +345,82 @@ public class Data
|
|
|
xmlNode = PlayerNode.SelectSingleNode("PlantList");
|
|
|
xmlNode.RemoveAll();
|
|
|
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "FlowerTraA1", ""));
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Id"));
|
|
|
+ xmlAttribute.Value = 1.ToString();
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("PlantList");
|
|
|
+
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "FlowerTraA2", ""));
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Id"));
|
|
|
+ xmlAttribute.Value = 2.ToString();
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("PlantList");
|
|
|
+
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "FlowerTraA3", ""));
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Id"));
|
|
|
+ xmlAttribute.Value = 3.ToString();
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("PlantList");
|
|
|
+
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "FlowerTraA4", ""));
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Id"));
|
|
|
+ xmlAttribute.Value = 4.ToString();
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("PlantList");
|
|
|
+
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "FlowerTraA5", ""));
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Id"));
|
|
|
+ xmlAttribute.Value = 5.ToString();
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("PlantList");
|
|
|
+
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "FlowerTraA6", ""));
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Id"));
|
|
|
+ xmlAttribute.Value = 6.ToString();
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("PlantList");
|
|
|
+
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "FlowerTraA7", ""));
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Id"));
|
|
|
+ xmlAttribute.Value = 7.ToString();
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("PlantList");
|
|
|
+
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "FlowerTraA8", ""));
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Id"));
|
|
|
+ xmlAttribute.Value = 8.ToString();
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("PlantList");
|
|
|
+
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "FlowerTraA9", ""));
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Id"));
|
|
|
+ xmlAttribute.Value = 9.ToString();
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("PlantList");
|
|
|
+
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "FlowerTraB1", ""));
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Id"));
|
|
|
+ xmlAttribute.Value = 10.ToString();
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("PlantList");
|
|
|
+
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "FlowerTraB2", ""));
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Id"));
|
|
|
+ xmlAttribute.Value = 11.ToString();
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("PlantList");
|
|
|
+
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "FlowerTraB3", ""));
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Id"));
|
|
|
+ xmlAttribute.Value = 12.ToString();
|
|
|
+
|
|
|
#endregion
|
|
|
|
|
|
- #region ProcessorList
|
|
|
+ #region FlowerList
|
|
|
|
|
|
- xmlNode = PlayerNode.SelectSingleNode("ProcessorList");
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("FlowerList");
|
|
|
xmlNode.RemoveAll();
|
|
|
|
|
|
+ foreach (var kv in ManaGarden.FlowerDic)
|
|
|
+ {
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "Flower", ""));
|
|
|
+
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Id"));
|
|
|
+ xmlAttribute.Value = kv.Value.Id.ToString();
|
|
|
+
|
|
|
+ xmlNode = PlayerNode.SelectSingleNode("FlowerList");
|
|
|
+ }
|
|
|
+
|
|
|
#endregion
|
|
|
|
|
|
PlayerDoc.Save(Application.dataPath + @"\Resources\XML\Config\PlayerConfig.xml");
|