修正Enka下获取面板时的圣遗物解析错误

This commit is contained in:
yoimiya-kokomi 2022-09-25 02:28:25 +08:00
parent 31dc8f190b
commit 279e997744
4 changed files with 6 additions and 18 deletions

View File

@ -85,8 +85,8 @@ async function renderCard (e, ds, renderType = 'card') {
data
}, { e, scale, retMsgId: true })
if (msgRes && msgRes.message_id) {
// 如果消息发送成功就将message_id和图片路径存起来1小时过期
await redis.set(`miao:original-picture:${msgRes.message_id}`, bg.img, { EX: 3600 })
// 如果消息发送成功就将message_id和图片路径存起来3小时过期
await redis.set(`miao:original-picture:${msgRes.message_id}`, bg.img, { EX: 3600 * 3 })
}
return true
}

View File

@ -1,6 +1,4 @@
import Cfg from './Cfg.js'
import { Version } from './index.js'
import render from './common-lib/render.js'
function sleep (ms) {

View File

@ -1,6 +1,6 @@
import lodash from 'lodash'
import enkaMeta from './enka-meta.js'
import { Character, Artifact, ProfileData } from '../../models/index.js'
import { Character, ArtifactSet, ProfileData } from '../../models/index.js'
const artiIdx = {
EQUIP_BRACER: 1,
@ -126,11 +126,9 @@ let EnkaData = {
if (!idx) {
return
}
let setName = enkaMeta[flat.setNameTextMapHash] || ''
ret[`arti${idx}`] = {
name: Artifact.getArtiBySet(setName, idx),
ret[idx] = {
name: ArtifactSet.getArtiNameBySet(setName, idx),
set: setName,
level: Math.min(20, ((ds.reliquary && ds.reliquary.level) || 1) - 1),
main: get(flat.reliquaryMainstat),

View File

@ -1,6 +1,6 @@
import Base from './Base.js'
import { ArtifactSet } from './index.js'
import { abbr, artiMap, attrMap } from '../resources/meta/artifact/index.js'
import { artiMap, attrMap } from '../resources/meta/artifact/index.js'
class Artifact extends Base {
constructor (name) {
@ -52,12 +52,4 @@ class Artifact extends Base {
}
}
// 根据圣遗物名称获取套装
// getSetByArti
// 获取指定圣遗物套装指定位置的名字
// getArtiBySet
// getAbbrBySet
// getMeta
export default Artifact