|
@@ -131,7 +131,10 @@ public class Data
|
|
|
|
|
|
Skill skill = (Skill)ManaData.SkillList[i];
|
|
Skill skill = (Skill)ManaData.SkillList[i];
|
|
|
|
|
|
- xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, skill._Name, ""));
|
|
|
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "Skill", ""));
|
|
|
|
+
|
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ID"));
|
|
|
|
+ xmlAttribute.Value = skill._Name;
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
xmlAttribute.Value = skill.SkillType.ToString();
|
|
xmlAttribute.Value = skill.SkillType.ToString();
|
|
@@ -158,14 +161,14 @@ public class Data
|
|
|
|
|
|
Pack pack = (Pack)ManaData.SkillList[i];
|
|
Pack pack = (Pack)ManaData.SkillList[i];
|
|
|
|
|
|
- xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "礼包", ""));
|
|
|
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "Skill", ""));
|
|
|
|
+
|
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ID"));
|
|
|
|
+ xmlAttribute.Value = pack._Name;
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
xmlAttribute.Value = pack.SkillType.ToString();
|
|
xmlAttribute.Value = pack.SkillType.ToString();
|
|
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Name"));
|
|
|
|
- xmlAttribute.Value = pack._Name;
|
|
|
|
-
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
|
|
xmlAttribute.Value = pack.ItemStatus.ToString();
|
|
xmlAttribute.Value = pack.ItemStatus.ToString();
|
|
|
|
|
|
@@ -182,7 +185,10 @@ public class Data
|
|
|
|
|
|
Ability ability = (Ability)ManaData.SkillList[i];
|
|
Ability ability = (Ability)ManaData.SkillList[i];
|
|
|
|
|
|
- xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, ability._Name, ""));
|
|
|
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "Skill", ""));
|
|
|
|
+
|
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ID"));
|
|
|
|
+ xmlAttribute.Value = ability._Name;
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
xmlAttribute.Value = ability.SkillType.ToString();
|
|
xmlAttribute.Value = ability.SkillType.ToString();
|
|
@@ -203,7 +209,10 @@ public class Data
|
|
|
|
|
|
BigSkill bigSkill = (BigSkill)ManaData.SkillList[i];
|
|
BigSkill bigSkill = (BigSkill)ManaData.SkillList[i];
|
|
|
|
|
|
- xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, bigSkill._Name, ""));
|
|
|
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "Skill", ""));
|
|
|
|
+
|
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ID"));
|
|
|
|
+ xmlAttribute.Value = bigSkill._Name;
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
xmlAttribute.Value = bigSkill.SkillType.ToString();
|
|
xmlAttribute.Value = bigSkill.SkillType.ToString();
|
|
@@ -233,17 +242,17 @@ public class Data
|
|
private static void SaveAchieve()
|
|
private static void SaveAchieve()
|
|
{
|
|
{
|
|
XmlNode xmlNode = PlayerNode.SelectSingleNode("AchieveList");
|
|
XmlNode xmlNode = PlayerNode.SelectSingleNode("AchieveList");
|
|
- xmlNode.InnerText = "";
|
|
|
|
|
|
+ xmlNode.Attributes[0].Value = "";
|
|
|
|
|
|
foreach (var kv in ManaAchieve.AchieveDic)
|
|
foreach (var kv in ManaAchieve.AchieveDic)
|
|
{
|
|
{
|
|
if (kv.Value.Valid == false)
|
|
if (kv.Value.Valid == false)
|
|
{
|
|
{
|
|
- xmlNode.InnerText += kv.Value.ID + " ";
|
|
|
|
|
|
+ xmlNode.Attributes[0].Value += kv.Value.ID + " ";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- xmlNode.InnerText = xmlNode.InnerText.TrimEnd(' ');
|
|
|
|
|
|
+ xmlNode.Attributes[0].Value = xmlNode.Attributes[0].Value.TrimEnd(' ');
|
|
|
|
|
|
PlayerNode.SelectSingleNode("AchieveData").Attributes[0].Value = ManaData.AD.ToString("0");
|
|
PlayerNode.SelectSingleNode("AchieveData").Attributes[0].Value = ManaData.AD.ToString("0");
|
|
PlayerNode.SelectSingleNode("AchieveData").Attributes[1].Value = ManaData.Skill.ToString("0");
|
|
PlayerNode.SelectSingleNode("AchieveData").Attributes[1].Value = ManaData.Skill.ToString("0");
|
|
@@ -255,15 +264,18 @@ public class Data
|
|
|
|
|
|
private static void SavePlantList()
|
|
private static void SavePlantList()
|
|
{
|
|
{
|
|
- XmlAttributeCollection attributes = PlayerNode.SelectSingleNode("PlantList").Attributes;
|
|
|
|
|
|
+ XmlAttributeCollection attribute = PlayerNode.SelectSingleNode("PlantList").Attributes;
|
|
|
|
|
|
- attributes.RemoveAll();
|
|
|
|
-
|
|
|
|
for (int i = 0; i < ManaGarden.PlantList.Count; i++)
|
|
for (int i = 0; i < ManaGarden.PlantList.Count; i++)
|
|
{
|
|
{
|
|
- attributes.Append(PlayerDoc.CreateAttribute(ManaGarden.PlantList[i].name));
|
|
|
|
|
|
+ Slot slot = ManaGarden.PlantList[i];
|
|
|
|
+
|
|
|
|
+ attribute[0].Value = slot.ID + "," + slot.name;
|
|
|
|
|
|
- attributes[i].Value = (ManaGarden.PlantList[i].Flower.FlowerInfo.Id - 1).ToString();
|
|
|
|
|
|
+ if (i < ManaGarden.PlantList.Count - 1)
|
|
|
|
+ {
|
|
|
|
+ attribute[0].Value += " ";
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -278,27 +290,25 @@ public class Data
|
|
PlayerNode.SelectSingleNode("CoinPerson").Attributes[0].Value = ManaData.CoinPerson.ToString();
|
|
PlayerNode.SelectSingleNode("CoinPerson").Attributes[0].Value = ManaData.CoinPerson.ToString();
|
|
PlayerNode.SelectSingleNode("MiniTimer").Attributes[0].Value = ManaData.MiniTimer.ToString();
|
|
PlayerNode.SelectSingleNode("MiniTimer").Attributes[0].Value = ManaData.MiniTimer.ToString();
|
|
PlayerNode.SelectSingleNode("CircleTimer").Attributes[0].Value = ManaData.CircleTimer.ToString();
|
|
PlayerNode.SelectSingleNode("CircleTimer").Attributes[0].Value = ManaData.CircleTimer.ToString();
|
|
- PlayerNode.SelectSingleNode("MiniGameAmt").Attributes[0].Value = ManaMiniGame.MiniGameAmt.ToString();
|
|
|
|
|
|
+ PlayerNode.SelectSingleNode("MiniGameIndex").Attributes[0].Value = ManaMiniGame.MiniGameIndex.ToString();
|
|
PlayerNode.SelectSingleNode("Player").Attributes[0].Value = Tutorial.SelectPlayer;
|
|
PlayerNode.SelectSingleNode("Player").Attributes[0].Value = Tutorial.SelectPlayer;
|
|
}
|
|
}
|
|
|
|
|
|
private static void SaveFlowerList()
|
|
private static void SaveFlowerList()
|
|
{
|
|
{
|
|
- XmlAttributeCollection attributes = PlayerNode.SelectSingleNode("FlowerList").Attributes;
|
|
|
|
-
|
|
|
|
- attributes[0].RemoveAll();
|
|
|
|
|
|
+ XmlAttribute attribute = PlayerNode.SelectSingleNode("FlowerList").Attributes[0];
|
|
|
|
|
|
- XmlAttribute xmlAttribute = attributes.Append(PlayerDoc.CreateAttribute("ID"));
|
|
|
|
|
|
+ attribute.Value = "";
|
|
|
|
|
|
for (int i = 0; i < ManaGarden.FlowerInfoList.Count; i++)
|
|
for (int i = 0; i < ManaGarden.FlowerInfoList.Count; i++)
|
|
{
|
|
{
|
|
if (ManaGarden.FlowerInfoList[i].Unlock)
|
|
if (ManaGarden.FlowerInfoList[i].Unlock)
|
|
{
|
|
{
|
|
- xmlAttribute.Value += ManaGarden.FlowerInfoList[i].Id - 1 + " ";
|
|
|
|
|
|
+ attribute.Value += ManaGarden.FlowerInfoList[i].ID + " ";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- xmlAttribute.Value = xmlAttribute.Value.Trim(' ');
|
|
|
|
|
|
+ attribute.Value = attribute.Value.Trim(' ');
|
|
}
|
|
}
|
|
|
|
|
|
public static void SavePlayerConfig()
|
|
public static void SavePlayerConfig()
|
|
@@ -333,7 +343,10 @@ public class Data
|
|
|
|
|
|
Skill skill = (Skill)ManaData.SkillList[i];
|
|
Skill skill = (Skill)ManaData.SkillList[i];
|
|
|
|
|
|
- xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, skill._Name, ""));
|
|
|
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "Skill", ""));
|
|
|
|
+
|
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ID"));
|
|
|
|
+ xmlAttribute.Value = skill._Name;
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
xmlAttribute.Value = skill.SkillType.ToString();
|
|
xmlAttribute.Value = skill.SkillType.ToString();
|
|
@@ -360,14 +373,14 @@ public class Data
|
|
|
|
|
|
Pack pack = (Pack)ManaData.SkillList[i];
|
|
Pack pack = (Pack)ManaData.SkillList[i];
|
|
|
|
|
|
- xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "礼包", ""));
|
|
|
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "Skill", ""));
|
|
|
|
+
|
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ID"));
|
|
|
|
+ xmlAttribute.Value = pack._Name;
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
xmlAttribute.Value = pack.SkillType.ToString();
|
|
xmlAttribute.Value = pack.SkillType.ToString();
|
|
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Name"));
|
|
|
|
- xmlAttribute.Value = pack._Name;
|
|
|
|
-
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
|
|
xmlAttribute.Value = SkillStatus.Lock.ToString();
|
|
xmlAttribute.Value = SkillStatus.Lock.ToString();
|
|
|
|
|
|
@@ -384,7 +397,10 @@ public class Data
|
|
|
|
|
|
Ability ability = (Ability)ManaData.SkillList[i];
|
|
Ability ability = (Ability)ManaData.SkillList[i];
|
|
|
|
|
|
- xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, ability._Name, ""));
|
|
|
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "Skill", ""));
|
|
|
|
+
|
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ID"));
|
|
|
|
+ xmlAttribute.Value = ability._Name;
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
xmlAttribute.Value = ability.SkillType.ToString();
|
|
xmlAttribute.Value = ability.SkillType.ToString();
|
|
@@ -405,7 +421,10 @@ public class Data
|
|
|
|
|
|
BigSkill bigSkill = (BigSkill)ManaData.SkillList[i];
|
|
BigSkill bigSkill = (BigSkill)ManaData.SkillList[i];
|
|
|
|
|
|
- xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, bigSkill._Name, ""));
|
|
|
|
|
|
+ xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "Skill", ""));
|
|
|
|
+
|
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ID"));
|
|
|
|
+ xmlAttribute.Value = bigSkill._Name;
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
xmlAttribute.Value = bigSkill.SkillType.ToString();
|
|
xmlAttribute.Value = bigSkill.SkillType.ToString();
|
|
@@ -435,7 +454,7 @@ public class Data
|
|
private static void ResetAchieve()
|
|
private static void ResetAchieve()
|
|
{
|
|
{
|
|
XmlNode xmlNode = PlayerNode.SelectSingleNode("AchieveList");
|
|
XmlNode xmlNode = PlayerNode.SelectSingleNode("AchieveList");
|
|
- xmlNode.InnerText = "";
|
|
|
|
|
|
+ xmlNode.Attributes[0].Value = "";
|
|
|
|
|
|
PlayerNode.SelectSingleNode("AchieveData").Attributes[0].Value = "0";
|
|
PlayerNode.SelectSingleNode("AchieveData").Attributes[0].Value = "0";
|
|
PlayerNode.SelectSingleNode("AchieveData").Attributes[1].Value = "0";
|
|
PlayerNode.SelectSingleNode("AchieveData").Attributes[1].Value = "0";
|
|
@@ -448,33 +467,13 @@ public class Data
|
|
private static void ResetPlantList()
|
|
private static void ResetPlantList()
|
|
{
|
|
{
|
|
XmlNode xmlNode = PlayerNode.SelectSingleNode("PlantList");
|
|
XmlNode xmlNode = PlayerNode.SelectSingleNode("PlantList");
|
|
- xmlNode.RemoveAll();
|
|
|
|
-
|
|
|
|
- XmlAttribute xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SlotA1"));
|
|
|
|
- xmlAttribute.Value = 0.ToString();
|
|
|
|
-
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SlotA2"));
|
|
|
|
- xmlAttribute.Value = 1.ToString();
|
|
|
|
-
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SlotA3"));
|
|
|
|
- xmlAttribute.Value = 2.ToString();
|
|
|
|
-
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SlotA4"));
|
|
|
|
- xmlAttribute.Value = 3.ToString();
|
|
|
|
-
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SlotA5"));
|
|
|
|
- xmlAttribute.Value = 4.ToString();
|
|
|
|
-
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SlotA6"));
|
|
|
|
- xmlAttribute.Value = 5.ToString();
|
|
|
|
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SlotA7"));
|
|
|
|
- xmlAttribute.Value = 6.ToString();
|
|
|
|
|
|
+ xmlNode.Attributes[0].Value = "";
|
|
}
|
|
}
|
|
|
|
|
|
private static void ResetCommon()
|
|
private static void ResetCommon()
|
|
{
|
|
{
|
|
- PlayerNode.SelectSingleNode("Slot").Attributes[0].Value = "7";
|
|
|
|
|
|
+ PlayerNode.SelectSingleNode("Slot").Attributes[0].Value = "1";
|
|
PlayerNode.SelectSingleNode("SignIndex").Attributes[0].Value = "0";
|
|
PlayerNode.SelectSingleNode("SignIndex").Attributes[0].Value = "0";
|
|
PlayerNode.SelectSingleNode("Coin").Attributes[0].Value = "0";
|
|
PlayerNode.SelectSingleNode("Coin").Attributes[0].Value = "0";
|
|
PlayerNode.SelectSingleNode("Level").Attributes[0].Value = "0";
|
|
PlayerNode.SelectSingleNode("Level").Attributes[0].Value = "0";
|
|
@@ -484,19 +483,15 @@ public class Data
|
|
PlayerNode.SelectSingleNode("CoinPerson").Attributes[0].Value = "0";
|
|
PlayerNode.SelectSingleNode("CoinPerson").Attributes[0].Value = "0";
|
|
PlayerNode.SelectSingleNode("MiniTimer").Attributes[0].Value = "0";
|
|
PlayerNode.SelectSingleNode("MiniTimer").Attributes[0].Value = "0";
|
|
PlayerNode.SelectSingleNode("CircleTimer").Attributes[0].Value = "10";
|
|
PlayerNode.SelectSingleNode("CircleTimer").Attributes[0].Value = "10";
|
|
- PlayerNode.SelectSingleNode("MiniGameAmt").Attributes[0].Value = "0";
|
|
|
|
|
|
+ PlayerNode.SelectSingleNode("MiniGameIndex").Attributes[0].Value = "0";
|
|
PlayerNode.SelectSingleNode("Player").Attributes[0].Value = "PlayerBlond";
|
|
PlayerNode.SelectSingleNode("Player").Attributes[0].Value = "PlayerBlond";
|
|
}
|
|
}
|
|
|
|
|
|
private static void ResetFlowerList()
|
|
private static void ResetFlowerList()
|
|
{
|
|
{
|
|
- XmlAttributeCollection attributes = PlayerNode.SelectSingleNode("FlowerList").Attributes;
|
|
|
|
|
|
+ XmlAttribute attribute = PlayerNode.SelectSingleNode("FlowerList").Attributes[0];
|
|
|
|
|
|
- attributes[0].RemoveAll();
|
|
|
|
-
|
|
|
|
- XmlAttribute xmlAttribute = attributes.Append(PlayerDoc.CreateAttribute("ID"));
|
|
|
|
-
|
|
|
|
- xmlAttribute.Value = "0 1 2 3 4 5 6 7 8 9";
|
|
|
|
|
|
+ attribute.Value = "1";
|
|
}
|
|
}
|
|
|
|
|
|
public static void ResetPlayerConfig()
|
|
public static void ResetPlayerConfig()
|
|
@@ -515,6 +510,113 @@ public class Data
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ public static int PlayerInt(string node)
|
|
|
|
+ {
|
|
|
|
+ return int.Parse(PlayerNode.SelectSingleNode(node).Attributes[0].Value);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static bool PlayerBool(string node)
|
|
|
|
+ {
|
|
|
|
+ return Convert.ToBoolean(int.Parse(PlayerNode.SelectSingleNode(node).Attributes[0].Value));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static float PlayerFloat(string node)
|
|
|
|
+ {
|
|
|
|
+ return float.Parse(PlayerNode.SelectSingleNode(node).Attributes[0].Value);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static double PlayerDouble(string node)
|
|
|
|
+ {
|
|
|
|
+ return double.Parse(PlayerNode.SelectSingleNode(node).Attributes[0].Value);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ public static List<int> GetFlowerList()
|
|
|
|
+ {
|
|
|
|
+ List<int> list = new List<int>();
|
|
|
|
+
|
|
|
|
+ XmlAttributeCollection attribute = PlayerNode.SelectSingleNode("FlowerList").Attributes;
|
|
|
|
+
|
|
|
|
+ if (!string.IsNullOrEmpty(attribute[0].Value))
|
|
|
|
+ {
|
|
|
|
+ string[] strings = attribute[0].Value.Split(' ');
|
|
|
|
+
|
|
|
|
+ for (int i = 0; i < strings.Length; i++)
|
|
|
|
+ {
|
|
|
|
+ list.Add(int.Parse(strings[i]));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return list;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static List<int> GetAchieveList()
|
|
|
|
+ {
|
|
|
|
+ List<int> list = new List<int>();
|
|
|
|
+
|
|
|
|
+ XmlNode node = PlayerNode.SelectSingleNode("AchieveList");
|
|
|
|
+
|
|
|
|
+ if (!string.IsNullOrEmpty(node.Attributes[0].Value))
|
|
|
|
+ {
|
|
|
|
+ string[] strings = node.Attributes[0].Value.Split(' ');
|
|
|
|
+
|
|
|
|
+ for (int i = 0; i < strings.Length; i++)
|
|
|
|
+ {
|
|
|
|
+ list.Add(int.Parse(strings[i]));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return list;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static List<double> GetAchieveData()
|
|
|
|
+ {
|
|
|
|
+ List<double> dataList = new List<double>();
|
|
|
|
+
|
|
|
|
+ dataList.Add(double.Parse(PlayerNode.SelectSingleNode("AchieveData").Attributes[0].Value));
|
|
|
|
+ dataList.Add(double.Parse(PlayerNode.SelectSingleNode("AchieveData").Attributes[1].Value));
|
|
|
|
+ dataList.Add(double.Parse(PlayerNode.SelectSingleNode("AchieveData").Attributes[2].Value));
|
|
|
|
+ dataList.Add(double.Parse(PlayerNode.SelectSingleNode("AchieveData").Attributes[3].Value));
|
|
|
|
+ dataList.Add(double.Parse(PlayerNode.SelectSingleNode("AchieveData").Attributes[4].Value));
|
|
|
|
+ dataList.Add(double.Parse(PlayerNode.SelectSingleNode("AchieveData").Attributes[5].Value));
|
|
|
|
+
|
|
|
|
+ return dataList;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static List<KV<int, string>> GetPlantList()
|
|
|
|
+ {
|
|
|
|
+ List<KV<int, string>> list = new List<KV<int, string>>();
|
|
|
|
+
|
|
|
|
+ XmlNode xmlNode = PlayerNode.SelectSingleNode("PlantList");
|
|
|
|
+
|
|
|
|
+ if (!string.IsNullOrEmpty(xmlNode.Attributes[0].Value))
|
|
|
|
+ {
|
|
|
|
+ string[] strings = xmlNode.Attributes[0].Value.Split(' ');
|
|
|
|
+
|
|
|
|
+ for (int i = 0; i < strings.Length; i++)
|
|
|
|
+ {
|
|
|
|
+ list.Add(new KV<int, string>(int.Parse(strings[i].Split(',')[0]), strings[i].Split(',')[1]));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return list;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static List<XmlAttributeCollection> GetSkillList()
|
|
|
|
+ {
|
|
|
|
+ List<XmlAttributeCollection> attributeList = new List<XmlAttributeCollection>();
|
|
|
|
+
|
|
|
|
+ XmlNodeList xmlNodeList = PlayerNode.SelectSingleNode("SkillList").ChildNodes;
|
|
|
|
+
|
|
|
|
+ for (int i = 0; i < xmlNodeList.Count; i++)
|
|
|
|
+ {
|
|
|
|
+ attributeList.Add(xmlNodeList[i].Attributes);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return attributeList;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
public static XmlAttributeCollection GetAwardConfig()
|
|
public static XmlAttributeCollection GetAwardConfig()
|
|
{
|
|
{
|
|
TextAsset textAsset;
|
|
TextAsset textAsset;
|
|
@@ -535,7 +637,7 @@ public class Data
|
|
TextAsset textAsset;
|
|
TextAsset textAsset;
|
|
XmlDocument xmlDoc = new XmlDocument();
|
|
XmlDocument xmlDoc = new XmlDocument();
|
|
List<XmlNodeList> xmlNodeLists = new List<XmlNodeList>();
|
|
List<XmlNodeList> xmlNodeLists = new List<XmlNodeList>();
|
|
- List<XmlAttributeCollection> attributesList = new List<XmlAttributeCollection>();
|
|
|
|
|
|
+ List<XmlAttributeCollection> attributeList = new List<XmlAttributeCollection>();
|
|
|
|
|
|
textAsset = Bundle.Config.LoadAsset<TextAsset>("pack_config");
|
|
textAsset = Bundle.Config.LoadAsset<TextAsset>("pack_config");
|
|
xmlDoc.LoadXml(textAsset.text);
|
|
xmlDoc.LoadXml(textAsset.text);
|
|
@@ -553,11 +655,11 @@ public class Data
|
|
{
|
|
{
|
|
for (int j = 0; j < xmlNodeLists[i].Count; j++)
|
|
for (int j = 0; j < xmlNodeLists[i].Count; j++)
|
|
{
|
|
{
|
|
- attributesList.Add(xmlNodeLists[i][j].Attributes);
|
|
|
|
|
|
+ attributeList.Add(xmlNodeLists[i][j].Attributes);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- return attributesList;
|
|
|
|
|
|
+ return attributeList;
|
|
}
|
|
}
|
|
|
|
|
|
public static List<XmlAttributeCollection> GetSignConfig()
|
|
public static List<XmlAttributeCollection> GetSignConfig()
|
|
@@ -592,7 +694,7 @@ public class Data
|
|
|
|
|
|
XmlDocument xmlDoc = new XmlDocument();
|
|
XmlDocument xmlDoc = new XmlDocument();
|
|
|
|
|
|
- List<XmlAttributeCollection> attributesList = new List<XmlAttributeCollection>();
|
|
|
|
|
|
+ List<XmlAttributeCollection> attributeList = new List<XmlAttributeCollection>();
|
|
|
|
|
|
textAsset = Bundle.Config.LoadAsset<TextAsset>("flower_config");
|
|
textAsset = Bundle.Config.LoadAsset<TextAsset>("flower_config");
|
|
|
|
|
|
@@ -602,10 +704,10 @@ public class Data
|
|
|
|
|
|
for (int i = 0; i < xmlNodeList.Count; i++)
|
|
for (int i = 0; i < xmlNodeList.Count; i++)
|
|
{
|
|
{
|
|
- attributesList.Add(xmlNodeList[i].Attributes);
|
|
|
|
|
|
+ attributeList.Add(xmlNodeList[i].Attributes);
|
|
}
|
|
}
|
|
|
|
|
|
- return attributesList;
|
|
|
|
|
|
+ return attributeList;
|
|
}
|
|
}
|
|
|
|
|
|
public static List<XmlAttributeCollection> GetAchieveConfig()
|
|
public static List<XmlAttributeCollection> GetAchieveConfig()
|
|
@@ -616,7 +718,7 @@ public class Data
|
|
|
|
|
|
XmlDocument xmlDoc = new XmlDocument();
|
|
XmlDocument xmlDoc = new XmlDocument();
|
|
|
|
|
|
- List<XmlAttributeCollection> attributesList = new List<XmlAttributeCollection>();
|
|
|
|
|
|
+ List<XmlAttributeCollection> attributeList = new List<XmlAttributeCollection>();
|
|
|
|
|
|
textAsset = Bundle.Config.LoadAsset<TextAsset>("achieve_config");
|
|
textAsset = Bundle.Config.LoadAsset<TextAsset>("achieve_config");
|
|
|
|
|
|
@@ -626,9 +728,9 @@ public class Data
|
|
|
|
|
|
for (int i = 0; i < xmlNodeList.Count; i++)
|
|
for (int i = 0; i < xmlNodeList.Count; i++)
|
|
{
|
|
{
|
|
- attributesList.Add(xmlNodeList[i].Attributes);
|
|
|
|
|
|
+ attributeList.Add(xmlNodeList[i].Attributes);
|
|
}
|
|
}
|
|
|
|
|
|
- return attributesList;
|
|
|
|
|
|
+ return attributeList;
|
|
}
|
|
}
|
|
}
|
|
}
|