diff --git a/apps/profile/ProfileList.js b/apps/profile/ProfileList.js index 45bd486d..385ce968 100644 --- a/apps/profile/ProfileList.js +++ b/apps/profile/ProfileList.js @@ -51,8 +51,10 @@ const ProfileList = { async render (e) { let uid = await getTargetUid(e) if (!uid) { + e._replyNeedUid || e.reply('请先发送【#绑定+你的UID】来绑定查询目标') return true } + let isSelfUid = false if (e.runtime) { let uids = e.runtime?.user?.ckUids || [] diff --git a/apps/profile/ProfileRank.js b/apps/profile/ProfileRank.js index 842cffbc..e71b8b2c 100644 --- a/apps/profile/ProfileRank.js +++ b/apps/profile/ProfileRank.js @@ -1,4 +1,4 @@ -import { Character, ProfileRank, ProfileDmg, Player } from '../../models/index.js' +import { Character, ProfileRank, ProfileDmg, Player } from '#miao.models' import ProfileDetail from './ProfileDetail.js' import { Data, Common, Format } from '#miao' import lodash from 'lodash' @@ -202,7 +202,7 @@ async function renderCharRankList ({ e, uids, char, mode, groupId }) { if (uid) { let userInfo = await ProfileRank.getUidInfo(uid) if (userInfo && userInfo.qq) { - let member = e.group?.pickMember(userInfo.qq * 1) + let member = e.group?.pickMember(userInfo.qq) let img = member?.getAvatarUrl(140) if (img) { tmp.qqFace = img @@ -225,15 +225,13 @@ async function renderCharRankList ({ e, uids, char, mode, groupId }) { } let title if (char) { - if (mode === 'mark') { - title = `#${char.name}${'圣遗物评分'}排行` - } - if (mode === 'crit') { - title = `#${char.name}${'双爆副词条'}排行` - } - if (mode === 'valid') { - title = `#${char.name}${'加权有效词条'}排行` + let modeTitleMap = { + dmg: '', + mark: '圣遗物评分', + crit: '双爆副词条', + valid: '加权有效词条' } + title = `#${char.name}${modeTitleMap[mode]}排行` list = lodash.sortBy(list, mode === 'dmg' ? '_dmg' : '_mark').reverse() } else { title = `#${mode === 'mark' ? '最高分' : '最强'}排行` diff --git a/components/Cfg.js b/components/Cfg.js index df4b2091..a6573ef3 100644 --- a/components/Cfg.js +++ b/components/Cfg.js @@ -1,20 +1,31 @@ import fs from 'fs' import lodash from 'lodash' import cfgData from './cfg/CfgData.js' +import { Version } from '#miao' const _path = process.cwd() const _cfgPath = `${_path}/plugins/miao-plugin/components/` let cfg = {} +let miaoCfg = {} + try { cfg = await cfgData.getCfg() cfgData.saveCfg(cfg) + lodash.forEach(cfgData.getCfgSchemaMap(), (cm) => { + if (cm.miao) { + miaoCfg[cm.cfgKey] = true + } + }) } catch (e) { // do nth } let Cfg = { get (rote) { + if (Version.isMiao && miaoCfg[rote]) { + return true + } return lodash.get(cfg, rote) }, set (rote, val) { diff --git a/resources/admin/index.html b/resources/admin/index.html index 03415dea..21cfa456 100644 --- a/resources/admin/index.html +++ b/resources/admin/index.html @@ -18,7 +18,7 @@
  • {{cfgItem.title}} - {{if !cfgItem.miao}} + {{if !(cfgItem.miao && isMiao) }} #喵喵设置{{cfgItem.key}} {{if cfgItem.type==='num'}} {{cfgItem.def}}{{else}} 开启/关闭{{/if}} diff --git a/resources/meta/artifact/calc.js b/resources/meta/artifact/calc.js index a0deba28..964835c3 100644 --- a/resources/meta/artifact/calc.js +++ b/resources/meta/artifact/calc.js @@ -366,6 +366,7 @@ const buffs = { 2: attr('dmg', 15, '草'), 4: { title: '元素战技或元素爆发命中敌人后,使命中目标的草元素抗性降低30%', + check: ({ element }) => element === '草', data: { kx: 30 } diff --git a/resources/meta/info/pool.js b/resources/meta/info/pool.js index ad01a387..b15cb1d5 100644 --- a/resources/meta/info/pool.js +++ b/resources/meta/info/pool.js @@ -433,4 +433,13 @@ export const poolDetail = [{ char4: ['米卡', '砂糖', '迪奥娜'], weapon5: ['息灾', '雾切之回光'], weapon4: ['暗巷的酒与诗', '祭礼剑', '钟剑', '西风长枪', '西风猎弓'] +}, { + version: '3.6', + half: '上半', + from: '2023-04-12 06:00:00', + to: '2023-05-02 17:59:59', + char5: ['妮露', '纳西妲'], + char4: ['米卡', '砂糖', '迪奥娜'], // 待更新 + weapon5: ['圣显之钥', '千夜浮梦'], + weapon4: ['暗巷的酒与诗', '祭礼剑', '钟剑', '西风长枪', '西风猎弓'] // 待更新 }]