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