mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-26 01:40:53 +00:00
修正proxy cons的问题
This commit is contained in:
parent
bc51c4b1a1
commit
62c943f3c2
@ -200,7 +200,7 @@ async function abyssPct (e) {
|
||||
|
||||
async function abyssTeam (e) {
|
||||
let mys = await MysApi.init(e, 'cookie')
|
||||
if (!mys || !mys.uid) {
|
||||
if (!mys || !mys.uid || !mys.isSelfCookie) {
|
||||
return true
|
||||
}
|
||||
|
||||
@ -210,12 +210,8 @@ async function abyssTeam (e) {
|
||||
return true
|
||||
}
|
||||
abyssData = abyssData.data
|
||||
let uid = e.selfUser.uid
|
||||
let avatars
|
||||
try {
|
||||
if (!await AvatarList.hasTalentCache(uid)) {
|
||||
e.reply('正在获取用户信息,请稍候...')
|
||||
}
|
||||
avatars = await AvatarList.getAll(e, mys)
|
||||
// resDetail = await mys.getCharacter()
|
||||
if (!avatars) {
|
||||
|
@ -40,7 +40,7 @@ export default class Avatar extends Base {
|
||||
if (profile && profile.isProfile && profile.hasData) {
|
||||
this.profile = profile
|
||||
}
|
||||
this.elem = ((profile && profile.elem) || data.element || data.elem || 'anemo').toLowerCase()
|
||||
this.elem = ((profile && profile.elem) || data.element || data.elem || char.elem || 'anemo').toLowerCase()
|
||||
if (char.isTraveler) {
|
||||
this.char = Character.get({ id: data.id || char.id, elem: this.elem })
|
||||
uid && char.setTraveler(uid)
|
||||
@ -105,7 +105,7 @@ export default class Avatar extends Base {
|
||||
get cons () {
|
||||
let data = this.meta
|
||||
let profile = this.profile
|
||||
return data.cons || data.actived_constellation_num || profile.cons || 0
|
||||
return data?.cons || data?.actived_constellation_num || profile?.cons || 0
|
||||
}
|
||||
|
||||
get weapon () {
|
||||
|
Loading…
Reference in New Issue
Block a user