fix:调整装备和道具的属性排序规则
This commit is contained in:
parent
c3efc938f0
commit
dcb4d220eb
@ -69,12 +69,12 @@ ActionParser.prototype.parse = function (obj,type) {
|
||||
return MotaActionBlocks['floorPartition_m'].xmlText([text_choices]);
|
||||
|
||||
case 'equip':
|
||||
if(!obj) obj={};
|
||||
if (!obj) obj = {};
|
||||
var buildEquip = function (obj) {
|
||||
obj = obj || {};
|
||||
var text_choices = null;
|
||||
var knownEquipListKeys = MotaActionBlocks['Equip_List'].options.map(function (one) {return one[1];})
|
||||
Object.keys(obj).sort().forEach(function (key) {
|
||||
var knownEquipListKeys = MotaActionBlocks['Equip_List'].options.map(function (one) { return one[1]; })
|
||||
Object.keys(obj).sort((a, b) => b.localeCompare(a)).forEach(function (key) {
|
||||
var one = knownEquipListKeys.indexOf(key) >= 0 ? 'equipKnown' : 'equipUnknown';
|
||||
text_choices = MotaActionBlocks[one].xmlText([
|
||||
key, obj[key], text_choices
|
||||
@ -91,7 +91,7 @@ ActionParser.prototype.parse = function (obj,type) {
|
||||
obj = obj || {};
|
||||
var text_choices = null;
|
||||
var knownItemListKeys = MotaActionBlocks['ItemEffect_List'].options.map(function (one) { return one[1]; })
|
||||
Object.keys(obj).sort().forEach(function (key) {
|
||||
Object.keys(obj).sort((a, b) => b.localeCompare(a)).forEach(function (key) {
|
||||
var addValue = obj[key];
|
||||
var noNeed = key.endsWith(':o');
|
||||
if (noNeed) key = key.substring(0, key.length - 2);
|
||||
|
||||
@ -113,9 +113,9 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"itemEffectEvent": {
|
||||
"sound": "gem.mp3",
|
||||
"value": {
|
||||
"mdef:o": "core.values.greenGem",
|
||||
"atk:o": "core.values.redGem",
|
||||
"def:o": "core.values.blueGem",
|
||||
"atk:o": "core.values.redGem"
|
||||
"mdef:o": "core.values.greenGem"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user