|
@@ -33,8 +33,8 @@ public class ManaData
|
|
|
{
|
|
|
if (PlayerDoc_ == null)
|
|
|
{
|
|
|
- int version = 0;
|
|
|
- int nativeVersion = 0;
|
|
|
+ int version;
|
|
|
+ int nativeVersion;
|
|
|
|
|
|
XmlNode node;
|
|
|
XmlDocument nativeDoc = new XmlDocument();
|
|
@@ -83,7 +83,7 @@ public class ManaData
|
|
|
else
|
|
|
{
|
|
|
nativeVersion = int.Parse(node.Attributes[0].Value);
|
|
|
-
|
|
|
+
|
|
|
if (nativeVersion < version)
|
|
|
{
|
|
|
StreamWriter sw = new StreamWriter(Application.persistentDataPath + "/PlayerConfig.xml");
|
|
@@ -104,7 +104,7 @@ public class ManaData
|
|
|
{
|
|
|
Debug.Log("Damage");
|
|
|
|
|
|
- DamageXml = true;
|
|
|
+ DamageLock = true;
|
|
|
|
|
|
ManaServer.Download(PlayerPrefs.GetString("id"), RecoveXml);
|
|
|
|
|
@@ -135,7 +135,7 @@ public class ManaData
|
|
|
public static XmlNode PlayerNode_;
|
|
|
public static XmlDocument PlayerDoc_;
|
|
|
|
|
|
- public static bool DamageXml;
|
|
|
+ public static bool DamageLock;
|
|
|
|
|
|
#endregion
|
|
|
|
|
@@ -165,7 +165,7 @@ public class ManaData
|
|
|
|
|
|
public static void RecoveXml(JsonData jsonData)
|
|
|
{
|
|
|
- DamageXml = false;
|
|
|
+ DamageLock = false;
|
|
|
|
|
|
if (jsonData.Inst_Object.Keys.Contains("l"))
|
|
|
{
|
|
@@ -208,7 +208,7 @@ public class ManaData
|
|
|
xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "Skill", ""));
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ID"));
|
|
|
- xmlAttribute.Value = skill.ID.ToString();
|
|
|
+ xmlAttribute.Value = skill.ID;
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
|
xmlAttribute.Value = skill.SkillType.ToString();
|
|
@@ -219,11 +219,11 @@ public class ManaData
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
|
|
|
xmlAttribute.Value = skill.Level.ToString();
|
|
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("CdTimer"));
|
|
|
- xmlAttribute.Value = skill.CoolTimer.ToString();
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("CoolTimer"));
|
|
|
+ xmlAttribute.Value = skill.CoolTimer.ToString("0");
|
|
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("EffectTimer"));
|
|
|
- xmlAttribute.Value = skill.UseTimer.ToString();
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("UseTimer"));
|
|
|
+ xmlAttribute.Value = skill.UseTimer.ToString("0");
|
|
|
|
|
|
xmlNode = PlayerNode.SelectSingleNode("SkillList");
|
|
|
|
|
@@ -238,7 +238,7 @@ public class ManaData
|
|
|
xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "Skill", ""));
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ID"));
|
|
|
- xmlAttribute.Value = pack.ID.ToString();
|
|
|
+ xmlAttribute.Value = pack.ID;
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
|
xmlAttribute.Value = pack.SkillType.ToString();
|
|
@@ -262,7 +262,7 @@ public class ManaData
|
|
|
xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "Skill", ""));
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ID"));
|
|
|
- xmlAttribute.Value = ability.ID.ToString();
|
|
|
+ xmlAttribute.Value = ability.ID;
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
|
xmlAttribute.Value = ability.SkillType.ToString();
|
|
@@ -286,7 +286,7 @@ public class ManaData
|
|
|
xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "Skill", ""));
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ID"));
|
|
|
- xmlAttribute.Value = bigSkill.ID.ToString();
|
|
|
+ xmlAttribute.Value = bigSkill.ID;
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
|
xmlAttribute.Value = bigSkill.SkillType.ToString();
|
|
@@ -300,11 +300,11 @@ public class ManaData
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
|
|
|
xmlAttribute.Value = bigSkill.Level.ToString();
|
|
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("CdTimer"));
|
|
|
- xmlAttribute.Value = bigSkill.CoolTimer.ToString();
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("CoolTimer"));
|
|
|
+ xmlAttribute.Value = bigSkill.CoolTimer.ToString("0");
|
|
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("EffectTimer"));
|
|
|
- xmlAttribute.Value = bigSkill.UseTimer.ToString();
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("UseTimer"));
|
|
|
+ xmlAttribute.Value = bigSkill.UseTimer.ToString("0");
|
|
|
|
|
|
xmlNode = PlayerNode.SelectSingleNode("SkillList");
|
|
|
|
|
@@ -320,7 +320,7 @@ public class ManaData
|
|
|
|
|
|
foreach (var kv in ManaAchieve.AchieveDic)
|
|
|
{
|
|
|
- if (!kv.Value.Valid)
|
|
|
+ if (!kv.Value.Lock)
|
|
|
{
|
|
|
xmlNode.Attributes[0].Value += kv.Value.ID_ + " ";
|
|
|
}
|
|
@@ -349,73 +349,35 @@ public class ManaData
|
|
|
{
|
|
|
Slot slot = ManaGarden.PlantList[i];
|
|
|
|
|
|
- attribute[0].Value = slot.ID + "," + slot.Index;
|
|
|
-
|
|
|
- if (i < ManaGarden.PlantList.Count - 1)
|
|
|
- {
|
|
|
- attribute[0].Value += " ";
|
|
|
- }
|
|
|
+ attribute[0].Value = slot.ID + "," + slot.Index + " ";
|
|
|
}
|
|
|
+
|
|
|
+ attribute[0].Value = attribute[0].Value.TrimEnd(' ');
|
|
|
}
|
|
|
|
|
|
public static void SaveCommon()
|
|
|
{
|
|
|
- if (!ManaTutorial.TutorialA)
|
|
|
- {
|
|
|
- PlayerNode.SelectSingleNode("Level").Attributes[0].Value = ManaCenter.Level.ToString();
|
|
|
- }
|
|
|
-
|
|
|
- PlayerNode.SelectSingleNode("Slot").Attributes[0].Value = ManaGarden.SlotAmt.ToString();
|
|
|
- PlayerNode.SelectSingleNode("SignIndex").Attributes[0].Value = ManaSign.SignIndex.ToString();
|
|
|
- PlayerNode.SelectSingleNode("SignRound").Attributes[0].Value = ManaSign.SignRound.ToString();
|
|
|
PlayerNode.SelectSingleNode("Coin").Attributes[0].Value = ManaCenter.Coin.ToString("0");
|
|
|
- PlayerNode.SelectSingleNode("Diamond").Attributes[0].Value = ManaCenter.Diamond.ToString();
|
|
|
- PlayerNode.SelectSingleNode("QuitTime").Attributes[0].Value = ManaServer.Time.ToString();
|
|
|
- PlayerNode.SelectSingleNode("MiniTimer").Attributes[0].Value = ManaCenter.MiniTimer.ToString();
|
|
|
- PlayerNode.SelectSingleNode("CircleTimer").Attributes[0].Value = ManaCenter.CircleTimer.ToString();
|
|
|
- PlayerNode.SelectSingleNode("MiniGameIndex").Attributes[0].Value = ManaMiniGame.MiniGameIndex.ToString();
|
|
|
- PlayerNode.SelectSingleNode("Player").Attributes[0].Value = ManaPlayer.SelePlayer;
|
|
|
- PlayerNode.SelectSingleNode("Language").Attributes[0].Value = ManaLan.CurrentLan.ToString();
|
|
|
+ PlayerNode.SelectSingleNode("Diamond").Attributes[0].Value = ManaCenter.Diamond.ToString("0");
|
|
|
|
|
|
- PlayerNode.SelectSingleNode("ID").Attributes[0].Value = ManaServer.ID;
|
|
|
-
|
|
|
PlayerNode.SelectSingleNode("SignTime").Attributes[0].Value = ManaSign.SignTime.ToString();
|
|
|
+ PlayerNode.SelectSingleNode("SignIndex").Attributes[0].Value = ManaSign.SignIndex.ToString();
|
|
|
+ PlayerNode.SelectSingleNode("SignRound").Attributes[0].Value = ManaSign.SignRound.ToString();
|
|
|
|
|
|
- if (ManaServer.Connect)
|
|
|
- {
|
|
|
- PlayerNode.SelectSingleNode("QuitFlag").Attributes[0].Value = "1";
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- PlayerNode.SelectSingleNode("QuitFlag").Attributes[0].Value = "0";
|
|
|
- }
|
|
|
+ PlayerNode.SelectSingleNode("QuitFlag").Attributes[0].Value = ManaServer.Connect.ToInt().ToString();
|
|
|
+ PlayerNode.SelectSingleNode("QuitTime").Attributes[0].Value = ManaServer.Time.ToString();
|
|
|
|
|
|
- if (ManaTutorial.TutorialA)
|
|
|
- {
|
|
|
- PlayerNode.SelectSingleNode("TutorialA").Attributes[0].Value = "1";
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- PlayerNode.SelectSingleNode("TutorialA").Attributes[0].Value = "0";
|
|
|
- }
|
|
|
+ PlayerNode.SelectSingleNode("MiniTimer").Attributes[0].Value = ManaCenter.MiniTimer.ToString("0");
|
|
|
+ PlayerNode.SelectSingleNode("CircleTimer").Attributes[0].Value = ManaCenter.CircleTimer.ToString("0");
|
|
|
|
|
|
- if (ManaTutorial.TutorialB_)
|
|
|
- {
|
|
|
- PlayerNode.SelectSingleNode("TutorialB").Attributes[0].Value = "1";
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- PlayerNode.SelectSingleNode("TutorialB").Attributes[0].Value = "0";
|
|
|
- }
|
|
|
+ PlayerNode.SelectSingleNode("ID").Attributes[0].Value = ManaServer.ID;
|
|
|
+ PlayerNode.SelectSingleNode("Player").Attributes[0].Value = ManaPlayer.SelePlayer;
|
|
|
+ PlayerNode.SelectSingleNode("Language").Attributes[0].Value = ManaLan.CurrentLan.ToString();
|
|
|
+ PlayerNode.SelectSingleNode("MiniGameIndex").Attributes[0].Value = ManaMiniGame.MiniGameIndex.ToString();
|
|
|
|
|
|
- if (ManaTutorial.TutorialC_)
|
|
|
- {
|
|
|
- PlayerNode.SelectSingleNode("TutorialC").Attributes[0].Value = "1";
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- PlayerNode.SelectSingleNode("TutorialC").Attributes[0].Value = "0";
|
|
|
- }
|
|
|
+ PlayerNode.SelectSingleNode("TutorialA").Attributes[0].Value = ManaTutorial.TutorialA.ToInt().ToString();
|
|
|
+ PlayerNode.SelectSingleNode("TutorialB").Attributes[0].Value = ManaTutorial.TutorialB_.ToInt().ToString();
|
|
|
+ PlayerNode.SelectSingleNode("TutorialC").Attributes[0].Value = ManaTutorial.TutorialC_.ToInt().ToString();
|
|
|
|
|
|
PlayerNode.SelectSingleNode("TutorialIndexA").Attributes[0].Value = ManaTutorial.TutorialIndexA.ToString();
|
|
|
PlayerNode.SelectSingleNode("TutorialIndexB").Attributes[0].Value = ManaTutorial.TutorialIndexB.ToString();
|
|
@@ -473,7 +435,7 @@ public class ManaData
|
|
|
xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "Skill", ""));
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ID"));
|
|
|
- xmlAttribute.Value = skill.ID.ToString();
|
|
|
+ xmlAttribute.Value = skill.ID;
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
|
xmlAttribute.Value = skill.SkillType.ToString();
|
|
@@ -482,13 +444,13 @@ public class ManaData
|
|
|
xmlAttribute.Value = SkillStatus.Lock.ToString();
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
|
|
|
- xmlAttribute.Value = 0.ToString();
|
|
|
+ xmlAttribute.Value = "0";
|
|
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("CdTimer"));
|
|
|
- xmlAttribute.Value = 0.ToString();
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("CoolTimer"));
|
|
|
+ xmlAttribute.Value = "0";
|
|
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("EffectTimer"));
|
|
|
- xmlAttribute.Value = 0.ToString();
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("UseTimer"));
|
|
|
+ xmlAttribute.Value = "0";
|
|
|
|
|
|
xmlNode = PlayerNode.SelectSingleNode("SkillList");
|
|
|
|
|
@@ -503,7 +465,7 @@ public class ManaData
|
|
|
xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "Skill", ""));
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ID"));
|
|
|
- xmlAttribute.Value = pack.ID.ToString();
|
|
|
+ xmlAttribute.Value = pack.ID;
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
|
xmlAttribute.Value = pack.SkillType.ToString();
|
|
@@ -512,7 +474,7 @@ public class ManaData
|
|
|
xmlAttribute.Value = SkillStatus.Lock.ToString();
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
|
|
|
- xmlAttribute.Value = 0.ToString();
|
|
|
+ xmlAttribute.Value = "0";
|
|
|
|
|
|
xmlNode = PlayerNode.SelectSingleNode("SkillList");
|
|
|
|
|
@@ -527,7 +489,7 @@ public class ManaData
|
|
|
xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "Skill", ""));
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ID"));
|
|
|
- xmlAttribute.Value = ability.ID.ToString();
|
|
|
+ xmlAttribute.Value = ability.ID;
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
|
xmlAttribute.Value = ability.SkillType.ToString();
|
|
@@ -536,7 +498,7 @@ public class ManaData
|
|
|
xmlAttribute.Value = SkillStatus.Lock.ToString();
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
|
|
|
- xmlAttribute.Value = 0.ToString();
|
|
|
+ xmlAttribute.Value = "0";
|
|
|
|
|
|
xmlNode = PlayerNode.SelectSingleNode("SkillList");
|
|
|
|
|
@@ -551,7 +513,7 @@ public class ManaData
|
|
|
xmlNode = xmlNode.AppendChild(PlayerDoc.CreateNode(XmlNodeType.Element, "Skill", ""));
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ID"));
|
|
|
- xmlAttribute.Value = bigSkill.ID.ToString();
|
|
|
+ xmlAttribute.Value = bigSkill.ID;
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("SkillType"));
|
|
|
xmlAttribute.Value = bigSkill.SkillType.ToString();
|
|
@@ -563,13 +525,13 @@ public class ManaData
|
|
|
xmlAttribute.Value = SkillStatus.UnLock.ToString();
|
|
|
|
|
|
xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
|
|
|
- xmlAttribute.Value = 0.ToString();
|
|
|
+ xmlAttribute.Value = "0";
|
|
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("CdTimer"));
|
|
|
- xmlAttribute.Value = 0.ToString();
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("CoolTimer"));
|
|
|
+ xmlAttribute.Value = "0";
|
|
|
|
|
|
- xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("EffectTimer"));
|
|
|
- xmlAttribute.Value = 0.ToString();
|
|
|
+ xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("UseTimer"));
|
|
|
+ xmlAttribute.Value = "0";
|
|
|
|
|
|
xmlNode = PlayerNode.SelectSingleNode("SkillList");
|
|
|
|
|
@@ -602,27 +564,30 @@ public class ManaData
|
|
|
|
|
|
public static void ResetCommon()
|
|
|
{
|
|
|
- PlayerNode.SelectSingleNode("Slot").Attributes[0].Value = "1";
|
|
|
+ PlayerNode.SelectSingleNode("SignTime").Attributes[0].Value = "4/22/2017 09:30:00 AM";
|
|
|
PlayerNode.SelectSingleNode("SignIndex").Attributes[0].Value = "1";
|
|
|
PlayerNode.SelectSingleNode("SignRound").Attributes[0].Value = "1";
|
|
|
+
|
|
|
PlayerNode.SelectSingleNode("Coin").Attributes[0].Value = "0";
|
|
|
- PlayerNode.SelectSingleNode("Level").Attributes[0].Value = "0";
|
|
|
PlayerNode.SelectSingleNode("Diamond").Attributes[0].Value = "0";
|
|
|
- PlayerNode.SelectSingleNode("QuitTime").Attributes[0].Value = DateTime.Now.ToString();
|
|
|
- PlayerNode.SelectSingleNode("MiniTimer").Attributes[0].Value = "0";
|
|
|
+
|
|
|
+ PlayerNode.SelectSingleNode("ID").Attributes[0].Value = "Default";
|
|
|
+ PlayerNode.SelectSingleNode("Player").Attributes[0].Value = "PlayerBlond";
|
|
|
+ PlayerNode.SelectSingleNode("Language").Attributes[0].Value = "ChineseSimplified";
|
|
|
PlayerNode.SelectSingleNode("CircleTimer").Attributes[0].Value = "10";
|
|
|
+
|
|
|
+ PlayerNode.SelectSingleNode("QuitFlag").Attributes[0].Value = "1";
|
|
|
+ PlayerNode.SelectSingleNode("QuitTime").Attributes[0].Value = "4/22/2017 09:30:00 AM";
|
|
|
+
|
|
|
+ PlayerNode.SelectSingleNode("MiniTimer").Attributes[0].Value = "0";
|
|
|
PlayerNode.SelectSingleNode("MiniGameIndex").Attributes[0].Value = "0";
|
|
|
- PlayerNode.SelectSingleNode("Player").Attributes[0].Value = "PlayerBlond";
|
|
|
+
|
|
|
PlayerNode.SelectSingleNode("TutorialA").Attributes[0].Value = "1";
|
|
|
PlayerNode.SelectSingleNode("TutorialB").Attributes[0].Value = "1";
|
|
|
PlayerNode.SelectSingleNode("TutorialC").Attributes[0].Value = "1";
|
|
|
PlayerNode.SelectSingleNode("TutorialIndexA").Attributes[0].Value = "1";
|
|
|
PlayerNode.SelectSingleNode("TutorialIndexB").Attributes[0].Value = "1";
|
|
|
PlayerNode.SelectSingleNode("TutorialIndexC").Attributes[0].Value = "1";
|
|
|
- PlayerNode.SelectSingleNode("ID").Attributes[0].Value = "Default";
|
|
|
- PlayerNode.SelectSingleNode("QuitFlag").Attributes[0].Value = "1";
|
|
|
- PlayerNode.SelectSingleNode("SignTime").Attributes[0].Value = "4/22/2017 09:30:00 AM";
|
|
|
- PlayerNode.SelectSingleNode("Language").Attributes[0].Value = "ChineseSimplified";
|
|
|
}
|
|
|
|
|
|
public static void ResetFlowerList()
|
|
@@ -651,7 +616,7 @@ public class ManaData
|
|
|
|
|
|
public static bool GetPlayerBool(string node)
|
|
|
{
|
|
|
- return Convert.ToBoolean(int.Parse(PlayerNode.SelectSingleNode(node).Attributes[0].Value));
|
|
|
+ return int.Parse(PlayerNode.SelectSingleNode(node).Attributes[0].Value).ToBool();
|
|
|
}
|
|
|
|
|
|
public static float GetPlayerFloat(string node)
|
|
@@ -677,20 +642,7 @@ public class ManaData
|
|
|
|
|
|
public static void SavePlayerBool(string node, bool value)
|
|
|
{
|
|
|
- string str;
|
|
|
-
|
|
|
- if (value)
|
|
|
- {
|
|
|
- str = "1";
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- str = "0";
|
|
|
- }
|
|
|
-
|
|
|
- PlayerNode.SelectSingleNode(node).Attributes[0].Value = str;
|
|
|
-
|
|
|
- SaveXml();
|
|
|
+ PlayerNode.SelectSingleNode(node).Attributes[0].Value = value.ToInt().ToString();
|
|
|
}
|
|
|
|
|
|
public static void SavePlayerFloat(string node, float value)
|
|
@@ -715,17 +667,7 @@ public class ManaData
|
|
|
|
|
|
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;
|
|
|
+ return Auxiliary.IntListParse(' ', attribute[0].Value, list);
|
|
|
}
|
|
|
|
|
|
public static List<int> GetAchieveList()
|
|
@@ -735,12 +677,10 @@ public class ManaData
|
|
|
|
|
|
public static List<string> GetOfflineConfig()
|
|
|
{
|
|
|
- TextAsset textAsset;
|
|
|
+ TextAsset textAsset = ManaReso.Load<TextAsset>("offline_config", Folder.Config);
|
|
|
|
|
|
XmlDocument xmlDoc = new XmlDocument();
|
|
|
|
|
|
- textAsset = ManaReso.Load<TextAsset>("offline_config", Folder.Config);
|
|
|
-
|
|
|
xmlDoc.LoadXml(textAsset.text);
|
|
|
|
|
|
XmlNode xmlNode = xmlDoc.SelectSingleNode("data").SelectSingleNode("item");
|
|
@@ -825,12 +765,10 @@ public class ManaData
|
|
|
|
|
|
public static XmlAttributeCollection GetVisitConfig()
|
|
|
{
|
|
|
- TextAsset textAsset;
|
|
|
+ TextAsset textAsset = ManaReso.Load<TextAsset>("visit_config", Folder.Config);
|
|
|
|
|
|
XmlDocument xmlDoc = new XmlDocument();
|
|
|
|
|
|
- textAsset = ManaReso.Load<TextAsset>("visit_config", Folder.Config);
|
|
|
-
|
|
|
xmlDoc.LoadXml(textAsset.text);
|
|
|
|
|
|
XmlNode xmlNode = xmlDoc.SelectSingleNode("data").SelectSingleNode("item");
|
|
@@ -840,11 +778,9 @@ public class ManaData
|
|
|
|
|
|
public static XmlAttributeCollection GetAwardConfig()
|
|
|
{
|
|
|
- TextAsset textAsset;
|
|
|
+ TextAsset textAsset = ManaReso.Load<TextAsset>("award_config", Folder.Config);
|
|
|
|
|
|
XmlDocument xmlDoc = new XmlDocument();
|
|
|
-
|
|
|
- textAsset = ManaReso.Load<TextAsset>("award_config", Folder.Config);
|
|
|
|
|
|
xmlDoc.LoadXml(textAsset.text);
|
|
|
|
|
@@ -857,26 +793,26 @@ public class ManaData
|
|
|
{
|
|
|
TextAsset textAsset;
|
|
|
XmlDocument xmlDoc = new XmlDocument();
|
|
|
- List<XmlNodeList> xmlNodeLists = new List<XmlNodeList>();
|
|
|
+ List<XmlNodeList> xmlNodeList = new List<XmlNodeList>();
|
|
|
List<XmlAttributeCollection> attributeList = new List<XmlAttributeCollection>();
|
|
|
|
|
|
textAsset = ManaReso.Load<TextAsset>("pack_config", Folder.Config);
|
|
|
xmlDoc.LoadXml(textAsset.text);
|
|
|
- xmlNodeLists.Add(xmlDoc.SelectSingleNode("data").SelectNodes("item"));
|
|
|
+ xmlNodeList.Add(xmlDoc.SelectSingleNode("data").SelectNodes("item"));
|
|
|
|
|
|
textAsset = ManaReso.Load<TextAsset>("skill_config", Folder.Config);
|
|
|
xmlDoc.LoadXml(textAsset.text);
|
|
|
- xmlNodeLists.Add(xmlDoc.SelectSingleNode("data").SelectNodes("item"));
|
|
|
+ xmlNodeList.Add(xmlDoc.SelectSingleNode("data").SelectNodes("item"));
|
|
|
|
|
|
textAsset = ManaReso.Load<TextAsset>("ability_config", Folder.Config);
|
|
|
xmlDoc.LoadXml(textAsset.text);
|
|
|
- xmlNodeLists.Add(xmlDoc.SelectSingleNode("data").SelectNodes("item"));
|
|
|
+ xmlNodeList.Add(xmlDoc.SelectSingleNode("data").SelectNodes("item"));
|
|
|
|
|
|
- for (int i = 0; i < xmlNodeLists.Count; i++)
|
|
|
+ for (int i = 0; i < xmlNodeList.Count; i++)
|
|
|
{
|
|
|
- for (int j = 0; j < xmlNodeLists[i].Count; j++)
|
|
|
+ for (int j = 0; j < xmlNodeList[i].Count; j++)
|
|
|
{
|
|
|
- attributeList.Add(xmlNodeLists[i][j].Attributes);
|
|
|
+ attributeList.Add(xmlNodeList[i][j].Attributes);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -886,13 +822,12 @@ public class ManaData
|
|
|
public static List<XmlAttributeCollection> GetSignConfig()
|
|
|
{
|
|
|
TextAsset textAsset;
|
|
|
-
|
|
|
XmlNodeList xmlNodeList;
|
|
|
|
|
|
XmlDocument xmlDoc = new XmlDocument();
|
|
|
-
|
|
|
List<XmlAttributeCollection> attributeList = new List<XmlAttributeCollection>();
|
|
|
|
|
|
+
|
|
|
textAsset = ManaReso.Load<TextAsset>("signin_config", Folder.Config);
|
|
|
|
|
|
xmlDoc.LoadXml(textAsset.text);
|
|
@@ -910,13 +845,12 @@ public class ManaData
|
|
|
public static List<XmlAttributeCollection> GetFlowerConfig()
|
|
|
{
|
|
|
TextAsset textAsset;
|
|
|
-
|
|
|
XmlNodeList xmlNodeList;
|
|
|
|
|
|
XmlDocument xmlDoc = new XmlDocument();
|
|
|
-
|
|
|
List<XmlAttributeCollection> attributeList = new List<XmlAttributeCollection>();
|
|
|
|
|
|
+
|
|
|
textAsset = ManaReso.Load<TextAsset>("flower_config", Folder.Config);
|
|
|
|
|
|
xmlDoc.LoadXml(textAsset.text);
|
|
@@ -934,13 +868,12 @@ public class ManaData
|
|
|
public static List<XmlAttributeCollection> GetAchieveConfig()
|
|
|
{
|
|
|
TextAsset textAsset;
|
|
|
-
|
|
|
XmlNodeList xmlNodeList;
|
|
|
|
|
|
XmlDocument xmlDoc = new XmlDocument();
|
|
|
-
|
|
|
List<XmlAttributeCollection> attributeList = new List<XmlAttributeCollection>();
|
|
|
|
|
|
+
|
|
|
textAsset = ManaReso.Load<TextAsset>("achieve_config", Folder.Config);
|
|
|
|
|
|
xmlDoc.LoadXml(textAsset.text);
|