mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-16 04:35:42 +00:00
修正已知问题
This commit is contained in:
parent
7927b0474f
commit
d196b36eb2
@ -246,7 +246,7 @@ const ProfileChange = {
|
|||||||
_source: 'change',
|
_source: 'change',
|
||||||
promote,
|
promote,
|
||||||
trees: lodash.extend([], source.trees)
|
trees: lodash.extend([], source.trees)
|
||||||
}, char.game, false)
|
}, char.game)
|
||||||
|
|
||||||
// 设置武器
|
// 设置武器
|
||||||
let wCfg = ds.weapon || {}
|
let wCfg = ds.weapon || {}
|
||||||
|
@ -23,6 +23,7 @@ export default class Avatar extends Base {
|
|||||||
this.game = char.game || game
|
this.game = char.game || game
|
||||||
this._mysArtis = new Artis(this.game)
|
this._mysArtis = new Artis(this.game)
|
||||||
this._artis = new Artis(this.game, true)
|
this._artis = new Artis(this.game, true)
|
||||||
|
this.setAvatar(ds)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -327,6 +328,9 @@ export default class Avatar extends Base {
|
|||||||
setArtis (ds = {}, isMysArtis = false) {
|
setArtis (ds = {}, isMysArtis = false) {
|
||||||
let artis = this.getArtis(isMysArtis)
|
let artis = this.getArtis(isMysArtis)
|
||||||
artis.setArtisData(ds)
|
artis.setArtisData(ds)
|
||||||
|
if (!this._mysArtis.hasArtis) {
|
||||||
|
this.setArtis(ds, true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取当前profileData的圣遗物评分,withDetail=false仅返回简略信息
|
// 获取当前profileData的圣遗物评分,withDetail=false仅返回简略信息
|
||||||
|
@ -121,7 +121,7 @@ class Character extends Base {
|
|||||||
|
|
||||||
// 获取角色描述
|
// 获取角色描述
|
||||||
get desc () {
|
get desc () {
|
||||||
return CharMeta.getDesc(this.meta.desc || '')
|
return CharMeta.getDesc(this.meta?._detail?.desc || '')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取头像
|
// 获取头像
|
||||||
@ -206,8 +206,8 @@ class Character extends Base {
|
|||||||
|
|
||||||
// 获取attr列表
|
// 获取attr列表
|
||||||
getAttrList () {
|
getAttrList () {
|
||||||
let { meta } = this
|
let { baseAttr, growAttr } = this
|
||||||
return CharMeta.getAttrList(meta.baseAttr, meta.growAttr, this.elemName)
|
return CharMeta.getAttrList(baseAttr, growAttr, this.elemName)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取素材
|
// 获取素材
|
||||||
@ -254,7 +254,7 @@ class Character extends Base {
|
|||||||
|
|
||||||
// 检查时装
|
// 检查时装
|
||||||
checkCostume (id) {
|
checkCostume (id) {
|
||||||
let costume = this.meta?.costume || []
|
let costume = this?.costume || []
|
||||||
return costume.includes(id * 1)
|
return costume.includes(id * 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import { Character } from './index.js'
|
|||||||
import DmgBuffs from './dmg/DmgBuffs.js'
|
import DmgBuffs from './dmg/DmgBuffs.js'
|
||||||
import DmgAttr from './dmg/DmgAttr.js'
|
import DmgAttr from './dmg/DmgAttr.js'
|
||||||
import DmgCalc from './dmg/DmgCalc.js'
|
import DmgCalc from './dmg/DmgCalc.js'
|
||||||
import { Common, MiaoError } from '#miao'
|
import { Common, MiaoError, Meta } from '#miao'
|
||||||
|
|
||||||
export default class ProfileDmg extends Base {
|
export default class ProfileDmg extends Base {
|
||||||
constructor (profile = {}, game = 'gs') {
|
constructor (profile = {}, game = 'gs') {
|
||||||
|
@ -116,7 +116,7 @@ const CharMeta = {
|
|||||||
return ret
|
return ret
|
||||||
},
|
},
|
||||||
getMaterials (char, type = 'all') {
|
getMaterials (char, type = 'all') {
|
||||||
let ds = char.meta.materials
|
let ds = char.materials
|
||||||
let ret = []
|
let ret = []
|
||||||
lodash.forEach(mKeys, (cfg) => {
|
lodash.forEach(mKeys, (cfg) => {
|
||||||
let title = ds[cfg.key]
|
let title = ds[cfg.key]
|
||||||
|
Loading…
Reference in New Issue
Block a user