|
@@ -953,166 +953,24 @@ public class ManaData : Regist
|
|
|
|
|
|
public static XmlDocument MergeXML(int nativeVersion, XmlDocument nativeDoc, XmlDocument defaultDoc)
|
|
|
{
|
|
|
- if (nativeVersion < 681)
|
|
|
+ if (nativeVersion < 0)
|
|
|
{
|
|
|
Debug.LogWarning("UpdateArchive");
|
|
|
|
|
|
- To681(nativeDoc, defaultDoc);
|
|
|
+ To0(nativeDoc, defaultDoc);
|
|
|
}
|
|
|
|
|
|
return nativeDoc;
|
|
|
}
|
|
|
|
|
|
- public static XmlDocument To681(XmlDocument nativeDoc, XmlDocument defaultDoc)
|
|
|
+ public static XmlDocument To0(XmlDocument nativeDoc, XmlDocument defaultDoc)
|
|
|
{
|
|
|
- string playerType = "";
|
|
|
- XmlNode xmlNode1 = nativeDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("DressList");
|
|
|
- XmlNode xmlNode2 = nativeDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("DressData");
|
|
|
- XmlNode xmlNode3 = nativeDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("TutorialD");
|
|
|
- XmlNode xmlNode4 = nativeDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("TutorialIndexD");
|
|
|
- XmlNode xmlNode5 = nativeDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("Player");
|
|
|
- XmlNode xmlNode6 = nativeDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("TutorialE");
|
|
|
- XmlNode xmlNode7 = nativeDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("TutorialIndexE");
|
|
|
- XmlNode xmlNode8 = nativeDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("AchieveData");
|
|
|
-
|
|
|
- if (xmlNode1 != null)
|
|
|
- {
|
|
|
- nativeDoc.SelectSingleNode("PlayerConfig").RemoveChild(xmlNode1);
|
|
|
- }
|
|
|
-
|
|
|
- if (xmlNode2 != null)
|
|
|
- {
|
|
|
- nativeDoc.SelectSingleNode("PlayerConfig").RemoveChild(xmlNode2);
|
|
|
- }
|
|
|
-
|
|
|
- if (xmlNode3 != null)
|
|
|
- {
|
|
|
- nativeDoc.SelectSingleNode("PlayerConfig").RemoveChild(xmlNode3);
|
|
|
- }
|
|
|
-
|
|
|
- if (xmlNode4 != null)
|
|
|
- {
|
|
|
- nativeDoc.SelectSingleNode("PlayerConfig").RemoveChild(xmlNode4);
|
|
|
- }
|
|
|
-
|
|
|
- if (xmlNode5 != null)
|
|
|
- {
|
|
|
- playerType = xmlNode5.Attributes[0].Value;
|
|
|
-
|
|
|
- nativeDoc.SelectSingleNode("PlayerConfig").RemoveChild(xmlNode5);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- playerType = "PlayerBlond";
|
|
|
- }
|
|
|
-
|
|
|
- if (xmlNode6 != null)
|
|
|
- {
|
|
|
- nativeDoc.SelectSingleNode("PlayerConfig").RemoveChild(xmlNode6);
|
|
|
- }
|
|
|
-
|
|
|
- if (xmlNode7 != null)
|
|
|
- {
|
|
|
- nativeDoc.SelectSingleNode("PlayerConfig").RemoveChild(xmlNode7);
|
|
|
- }
|
|
|
-
|
|
|
- if (xmlNode8 != null)
|
|
|
- {
|
|
|
- nativeDoc.SelectSingleNode("PlayerConfig").RemoveChild(xmlNode8);
|
|
|
- }
|
|
|
-
|
|
|
+ nativeDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("Version").Attributes[0].Value = 0.ToString();
|
|
|
|
|
|
- nativeDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("Version").Attributes[0].Value = 681.ToString();
|
|
|
-
|
|
|
- xmlNode1 = defaultDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("DressList");
|
|
|
- xmlNode2 = defaultDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("DressData");
|
|
|
- xmlNode3 = defaultDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("TutorialD");
|
|
|
- xmlNode4 = defaultDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("TutorialIndexD");
|
|
|
- xmlNode5 = defaultDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("Player");
|
|
|
- xmlNode6 = defaultDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("TutorialE");
|
|
|
- xmlNode7 = defaultDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("TutorialIndexE");
|
|
|
- xmlNode8 = defaultDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("AchieveData");
|
|
|
-
|
|
|
- if (playerType == "PlayerBlond")
|
|
|
- {
|
|
|
- xmlNode2.Attributes[0].Value = "脑壳1";
|
|
|
- xmlNode2.Attributes[1].Value = "裙子1";
|
|
|
- xmlNode2.Attributes[2].Value = "鞋子1";
|
|
|
- xmlNode2.Attributes[3].Value = "头饰品1";
|
|
|
- xmlNode2.Attributes[4].Value = "上衣1";
|
|
|
- xmlNode2.Attributes[5].Value = "眼睛1";
|
|
|
- xmlNode2.Attributes[6].Value = "嘴巴1";
|
|
|
- xmlNode2.Attributes[7].Value = "Empty";
|
|
|
- }
|
|
|
- else if (playerType == "PlayerBrown")
|
|
|
- {
|
|
|
- xmlNode2.Attributes[0].Value = "脑壳2";
|
|
|
- xmlNode2.Attributes[1].Value = "裙子2";
|
|
|
- xmlNode2.Attributes[2].Value = "鞋子2";
|
|
|
- xmlNode2.Attributes[3].Value = "头饰品2";
|
|
|
- xmlNode2.Attributes[4].Value = "上衣2";
|
|
|
- xmlNode2.Attributes[5].Value = "眼睛2";
|
|
|
- xmlNode2.Attributes[6].Value = "嘴巴2";
|
|
|
- xmlNode2.Attributes[7].Value = "Empty";
|
|
|
- }
|
|
|
- else if (playerType == "PlayerPink")
|
|
|
- {
|
|
|
- xmlNode2.Attributes[0].Value = "脑壳3";
|
|
|
- xmlNode2.Attributes[1].Value = "裙子3";
|
|
|
- xmlNode2.Attributes[2].Value = "鞋子3";
|
|
|
- xmlNode2.Attributes[3].Value = "头饰品3";
|
|
|
- xmlNode2.Attributes[4].Value = "上衣3";
|
|
|
- xmlNode2.Attributes[5].Value = "眼睛3";
|
|
|
- xmlNode2.Attributes[6].Value = "嘴巴3";
|
|
|
- xmlNode2.Attributes[7].Value = "Empty";
|
|
|
- }
|
|
|
+ XmlNode xmlNode1 = defaultDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("ADPlayTime");
|
|
|
|
|
|
nativeDoc.SelectSingleNode("PlayerConfig").AppendChild(nativeDoc.ImportNode(xmlNode1, true));
|
|
|
- nativeDoc.SelectSingleNode("PlayerConfig").AppendChild(nativeDoc.ImportNode(xmlNode2, true));
|
|
|
- nativeDoc.SelectSingleNode("PlayerConfig").AppendChild(nativeDoc.ImportNode(xmlNode3, true));
|
|
|
- nativeDoc.SelectSingleNode("PlayerConfig").AppendChild(nativeDoc.ImportNode(xmlNode4, true));
|
|
|
- nativeDoc.SelectSingleNode("PlayerConfig").AppendChild(nativeDoc.ImportNode(xmlNode5, true));
|
|
|
- nativeDoc.SelectSingleNode("PlayerConfig").AppendChild(nativeDoc.ImportNode(xmlNode6, true));
|
|
|
- nativeDoc.SelectSingleNode("PlayerConfig").AppendChild(nativeDoc.ImportNode(xmlNode7, true));
|
|
|
- nativeDoc.SelectSingleNode("PlayerConfig").AppendChild(nativeDoc.ImportNode(xmlNode8, true));
|
|
|
-
|
|
|
-
|
|
|
- xmlNode1 = nativeDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("SkillList");
|
|
|
- xmlNode2 = defaultDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("SkillList");
|
|
|
-
|
|
|
- XmlNodeList xmlNodeList1 = xmlNode1.ChildNodes;
|
|
|
- XmlNodeList xmlNodeList2 = xmlNode2.ChildNodes;
|
|
|
-
|
|
|
- for (int i = 0; i < xmlNodeList1.Count; i++)
|
|
|
- {
|
|
|
- string id = xmlNodeList1[i].Attributes[0].Value;
|
|
|
-
|
|
|
- if (id.Contains("Ability"))
|
|
|
- {
|
|
|
- int index = int.Parse(id.Replace("Ability", ""));
|
|
|
-
|
|
|
- if (index >= 15 && index <= 24)
|
|
|
- {
|
|
|
- xmlNode1.RemoveChild(xmlNodeList1[i--]);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- for (int i = 0; i < xmlNodeList2.Count; i++)
|
|
|
- {
|
|
|
- string id = xmlNodeList2[i].Attributes[0].Value;
|
|
|
|
|
|
- if (id.Contains("Ability"))
|
|
|
- {
|
|
|
- int index = int.Parse(id.Replace("Ability", ""));
|
|
|
-
|
|
|
- if (index >= 15 && index <= 24)
|
|
|
- {
|
|
|
- xmlNode1.AppendChild(nativeDoc.ImportNode(xmlNodeList2[i], true));
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
return nativeDoc;
|
|
|
}
|
|
|
}
|