fix: 未实装内容处理逻辑部分调整

This commit is contained in:
papple104 2023-10-08 20:43:48 +08:00
parent c384ceeb9e
commit e24c7c7a43
3 changed files with 11 additions and 3 deletions

View File

@ -100,7 +100,9 @@ let ProfileDetail = {
if (!profileChange && Number(e.uid) > 100000006) {
e.reply('角色尚未实装')
return true
} else if (Cfg.get('notReleasedData') === false) {
}
// 但仅在未实装开启时展示
if (Cfg.get('notReleasedData') === false) {
e.reply('未实装角色面板已禁用...')
return true
}

View File

@ -1,5 +1,5 @@
import ProfileDetail from './ProfileDetail.js'
import { Data, Common, Format } from '#miao'
import { Data, Common, Format, Cfg } from '#miao'
import { Character, ProfileRank, ProfileDmg, Player } from '#miao.models'
import lodash from 'lodash'
@ -37,6 +37,10 @@ export async function groupRank (e) {
let player = Player.create(100000000)
if (player.getProfile(char.id)) {
e.uid = 100000000
if (Cfg.get('notReleasedData') === false) {
e.reply('未实装角色面板已禁用...')
return true
}
return await ProfileDetail.render(e, char)
} else {
return true

View File

@ -137,7 +137,9 @@ export const cfgSchema = {
notReleasedData: {
title: '未实装角色数据',
key: '未实装',
def: true
def: true,
showDesc: true,
desc: '开启时才能查看未实装角色信息。数据仅供参考,请以游戏正式实装内容为准'
},
charPic: {
title: '角色图片',