增加对itemEffectTip的格式转写,修复滑冰转写bug,增加对hero.equipment的检查
This commit is contained in:
parent
b3724bc752
commit
8bb1a552cc
@ -159,7 +159,14 @@ namespace H5MotaUpdate.ViewModels
|
|||||||
heroItemData = (JObject)heroData["items"];
|
heroItemData = (JObject)heroData["items"];
|
||||||
heroData["image"] = "hero.png";
|
heroData["image"] = "hero.png";
|
||||||
heroData["followers"] = new JArray();
|
heroData["followers"] = new JArray();
|
||||||
if (heroData["exp"] == null) heroData["exp"] = heroData["experience"];
|
if (heroData["exp"] == null)
|
||||||
|
{
|
||||||
|
heroData["exp"] = heroData["experience"];
|
||||||
|
}
|
||||||
|
if (heroData["equipment"] == null)
|
||||||
|
{
|
||||||
|
heroData["equipment"] = new JArray(); // 预防某些超级老样板没有hero.equipment}
|
||||||
|
}
|
||||||
heroData.Remove("experience");
|
heroData.Remove("experience");
|
||||||
|
|
||||||
JObject heroToolsData = (JObject)heroItemData["tools"];
|
JObject heroToolsData = (JObject)heroItemData["tools"];
|
||||||
@ -299,13 +306,12 @@ namespace H5MotaUpdate.ViewModels
|
|||||||
{
|
{
|
||||||
statusBarItemsArr.Add(status);
|
statusBarItemsArr.Add(status);
|
||||||
}
|
}
|
||||||
else if (new string[] { "enableHP", "enableAtk", "enableDef" }.Contains(status)) // hp,atk,def为2.7前默认显示的变量,必须显示
|
else if (new string[] { "enableHP", "enableAtk", "enableDef" }.Contains(status))
|
||||||
|
{// hp,atk,def为2.7前默认显示的变量,必须显示
|
||||||
{
|
|
||||||
statusBarItemsArr.Add(status);
|
statusBarItemsArr.Add(status);
|
||||||
}
|
}
|
||||||
else if (status == "enableExp" && flagsData["enableExperience"].Value<bool>() == true) // experience更新为exp
|
else if (status == "enableExp" && flagsData["enableExperience"].Value<bool>() == true)
|
||||||
{
|
{// experience更新为exp
|
||||||
statusBarItemsArr.Add(status);
|
statusBarItemsArr.Add(status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,11 +154,18 @@ namespace H5MotaUpdate.ViewModels
|
|||||||
if (onePoint == 167 && version.CompareTo(new Version(2, 6)) < 0)
|
if (onePoint == 167 && version.CompareTo(new Version(2, 6)) < 0)
|
||||||
{
|
{
|
||||||
// 2.6以后,滑冰转移到背景层
|
// 2.6以后,滑冰转移到背景层
|
||||||
JArray bgMatrix = (JArray)jsonObject["bgmap"].DeepClone();
|
if (jsonObject["bgmap"] == null)
|
||||||
if (bgMatrix == null || bgMatrix.Count == 0)
|
|
||||||
{
|
{
|
||||||
jsonObject["bgmap"] = zeroBgMatrix.DeepClone();
|
jsonObject["bgmap"] = zeroBgMatrix.DeepClone();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
JArray bgMatrix = (JArray)jsonObject["bgmap"];
|
||||||
|
if (bgMatrix.Count == 0)
|
||||||
|
{
|
||||||
|
jsonObject["bgmap"] = zeroBgMatrix.DeepClone();
|
||||||
|
}
|
||||||
|
}
|
||||||
jsonObject["bgmap"][i][j] = 167;
|
jsonObject["bgmap"][i][j] = 167;
|
||||||
mapMatrix[i][j] = 0;
|
mapMatrix[i][j] = 0;
|
||||||
}
|
}
|
||||||
|
@ -92,6 +92,10 @@ namespace H5MotaUpdate.ViewModels
|
|||||||
if (newItemDatas.ContainsKey(key))
|
if (newItemDatas.ContainsKey(key))
|
||||||
{
|
{
|
||||||
JObject itemData = (JObject)newItemDatas[key];
|
JObject itemData = (JObject)newItemDatas[key];
|
||||||
|
if (ele== "itemEffectTip")
|
||||||
|
{
|
||||||
|
valueString = "${" + valueString + "}";
|
||||||
|
}
|
||||||
itemData[ele] = valueString;
|
itemData[ele] = valueString;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user