精简空内容时的url链接
This commit is contained in:
parent
a0607f03c9
commit
69bcf4ec22
|
@ -54,6 +54,20 @@ Number.prototype.PrefixInteger = function(length)
|
|||
{
|
||||
return (Array(length).join('0') + this).slice(-length);
|
||||
}
|
||||
//数组删除自己尾部的空元素
|
||||
Array.prototype.DeleteLatter = function(item = null)
|
||||
{
|
||||
let index = this.length - 1;
|
||||
for (; index>=0; index--)
|
||||
{
|
||||
if (this[index] !== item)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.splice(index + 1);
|
||||
return this;
|
||||
}
|
||||
|
||||
//▼ADPCM播放相关,来自 https://github.com/jy4340132/aaa
|
||||
const pcmMemory = new WebAssembly.Memory({initial: 256, maximum: 256});
|
||||
|
|
|
@ -129,6 +129,7 @@ var Member = function() {
|
|||
};
|
||||
Member.prototype.outObj = function() {
|
||||
const m = this;
|
||||
if (m.id == 0) return null;
|
||||
let obj = [m.id];
|
||||
if (m.level != undefined) obj[1] = m.level;
|
||||
if (m.awoken != undefined) obj[2] = m.awoken;
|
||||
|
@ -254,10 +255,10 @@ Formation.prototype.outObj = function() {
|
|||
const teamArr = [];
|
||||
teamArr[0] = t[0].map(m =>
|
||||
m.outObj()
|
||||
);
|
||||
).DeleteLatter();
|
||||
teamArr[1] = t[1].map(m =>
|
||||
m.outObj()
|
||||
);
|
||||
).DeleteLatter();
|
||||
if (t[2]) teamArr[2] = t[2];
|
||||
return teamArr;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue