修正V3 yunzai下原图命令不可用问题

修正#雷神面板 普攻天赋在有公子加成时的数字及皇冠问题
This commit is contained in:
yoimiya-kokomi 2022-08-04 02:32:10 +08:00
parent 7b47b5f3bc
commit 96044e5da0
6 changed files with 42 additions and 10 deletions

View File

@ -2,7 +2,7 @@ import { segment } from 'oicq'
/** 获取角色卡片的原图 */
export async function getOriginalPicture (e) {
if (!e.hasReply) {
if (!e.hasReply && !e.source) {
return
}
// 引用的消息不是自己的消息

View File

@ -159,6 +159,13 @@ class Character extends Base {
}
}
})
if (this.id * 1 !== 10000033) {
let a = ret.a || {}
if (a.level > 10) {
a.level = 10
a.original = 10
}
}
return ret
}

View File

@ -0,0 +1,7 @@
import Base from './Base.js'
export default class ProfileData extends Base {
constructor (data) {
super()
}
}

View File

@ -226,7 +226,7 @@ let Data = {
if (ret._fix) {
return ret
}
let { attr, id } = ret
let { attr, talent, id } = ret
id = id * 1
switch (id) {
case 10000052:
@ -237,12 +237,13 @@ let Data = {
// 莫娜被动fix
attr.dmgBonus = Math.max(0, attr.dmgBonus - attr.recharge * 0.2)
break
/*
case 10000060:
// 夜兰被动fix
attr.hp = attr.hp - attr.hpBase * 0.3
break;
*/
}
if (id !== 10000033) {
let a = talent.a || {}
if (a.level_current > 10) {
a.level_current = 10
a.level_original = 10
}
}
ret._fix = true
return ret

View File

@ -88,7 +88,7 @@ let Miao = {
let ds = data.uidData
let char = Character.get(ds.id)
let now = moment()
return {
let ret = {
id: ds.id,
name: char ? char.name : '',
dataSource: 'miao',
@ -102,6 +102,7 @@ let Miao = {
talent: Miao.getTalent(char.id, ds.skill),
_priority: 10
}
return Miao.dataFix(ret)
},
getAttr (data) {
let ret = {}
@ -216,6 +217,22 @@ let Miao = {
}
})
return ret
},
dataFix (ret) {
if (ret._fix) {
return ret
}
let { talent, id } = ret
id = id * 1
if (id !== 10000033) {
let a = talent.a || {}
if (a.level_current > 10) {
a.level_current = 10
a.level_original = 10
}
}
ret._fix = true
return ret
}
}

View File

@ -21,7 +21,7 @@
<div class="talent-item">
<div class="talent-icon
{{talent[key].level > talent[key].original ? `talent-plus`:``}}
{{talent[key].original == 10 ? `talent-crown`:``}}">
{{talent[key].original >= 10 ? `talent-crown`:``}}">
<div class="talent-icon-img"
style="background-image:url({{_res_path}}/meta/character/{{name}}/talent_{{key}}.png)"></div>
<span>{{talent[key].level}}</span>