diff --git a/apps/character/utils.js b/apps/character/utils.js index e42cb7e8..839d4ad7 100644 --- a/apps/character/utils.js +++ b/apps/character/utils.js @@ -2,7 +2,7 @@ import { segment } from 'oicq' /** 获取角色卡片的原图 */ export async function getOriginalPicture (e) { - if (!e.hasReply) { + if (!e.hasReply && !e.source) { return } // 引用的消息不是自己的消息 diff --git a/components/models/Character.js b/components/models/Character.js index f053ee51..81d4f4b5 100644 --- a/components/models/Character.js +++ b/components/models/Character.js @@ -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 } diff --git a/components/models/ProfileData.js b/components/models/ProfileData.js new file mode 100644 index 00000000..0aa4eed2 --- /dev/null +++ b/components/models/ProfileData.js @@ -0,0 +1,7 @@ +import Base from './Base.js' + +export default class ProfileData extends Base { + constructor (data) { + super() + } +} \ No newline at end of file diff --git a/components/profile-data/enka-data.js b/components/profile-data/enka-data.js index d135cbd2..a1a2d3c9 100644 --- a/components/profile-data/enka-data.js +++ b/components/profile-data/enka-data.js @@ -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 diff --git a/components/profile-data/miao.js b/components/profile-data/miao.js index 119a67e4..a470fc6e 100644 --- a/components/profile-data/miao.js +++ b/components/profile-data/miao.js @@ -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 } } diff --git a/resources/character/detail.html b/resources/character/detail.html index a937266b..23ceb418 100644 --- a/resources/character/detail.html +++ b/resources/character/detail.html @@ -21,7 +21,7 @@