diff --git a/apps/character/avatar-card.js b/apps/character/avatar-card.js
index df0ff8c9..0656fa69 100644
--- a/apps/character/avatar-card.js
+++ b/apps/character/avatar-card.js
@@ -14,7 +14,7 @@ export async function renderAvatar (e, avatar, renderType = 'card') {
let mys = await MysApi.init(e)
if (!mys) return true
uid = mys.uid
- if (char.isCustom) {
+ if (!char.isArrive) {
avatar = { id: char.id, name: char.name, detail: false }
} else {
let profile = Profile.get(uid, char.id, true)
@@ -52,7 +52,8 @@ async function renderCard (e, ds, renderType = 'card') {
let uid = e.uid || (e.targetUser && e.targetUser.uid)
let data = {}
let custom = char.isCustom
- if (!custom) {
+ let arrive = char.isArrive
+ if (arrive) {
let mys = await MysApi.init(e)
let avatar = new Avatar(ds, uid, mys.isSelfCookie)
data = avatar.getData('id,name,sName,level,fetter,cons,weapon,elem,artis,artisSet,imgs,dataSourceName,updateTime')
@@ -82,6 +83,7 @@ async function renderCard (e, ds, renderType = 'card') {
widthStyle: ``,
mode: bg.mode,
custom,
+ arrive,
data
}, { e, scale, retMsgId: true })
if (msgRes && msgRes.message_id) {
diff --git a/apps/profile.js b/apps/profile.js
index a99a5928..254d49c9 100644
--- a/apps/profile.js
+++ b/apps/profile.js
@@ -126,6 +126,10 @@ export async function profileDetail (e) {
e.reply('自定义角色暂不支持此功能')
return true
}
+ if (!char.isArrive) {
+ e.reply('角色尚未实装')
+ return true
+ }
if (mode === 'profile' || mode === 'dmg') {
return renderProfile(e, char, mode, { dmgIdx })
diff --git a/apps/wiki/CharWiki.js b/apps/wiki/CharWiki.js
index 2025a695..66459f43 100644
--- a/apps/wiki/CharWiki.js
+++ b/apps/wiki/CharWiki.js
@@ -1,7 +1,7 @@
import HutaoApi from '../stat/HutaoApi.js';
import lodash from 'lodash';
import { Format } from '../../components/index.js';
-import { Artifact, ArtifactSet, Weapon } from '../../models/index.js';
+import { ArtifactSet, Weapon } from '../../models/index.js';
let CharWiki = {
// 命座持有
diff --git a/models/Character.js b/models/Character.js
index 117aa02f..2714d8d2 100644
--- a/models/Character.js
+++ b/models/Character.js
@@ -43,6 +43,16 @@ class Character extends Base {
return !/[12]0\d{6}/.test(this._id)
}
+ get isArrive () {
+ if (this.isCustom) {
+ return false
+ }
+ if (this.eta) {
+ return this.eta * 1 < new Date() * 1
+ }
+ return true
+ }
+
get id () {
return this.isCustom ? this._id : this._id * 1
}
diff --git a/resources/character-img/莱依拉/01.jpg b/resources/character-img/莱依拉/01.jpg
new file mode 100644
index 00000000..ffb0dcf7
Binary files /dev/null and b/resources/character-img/莱依拉/01.jpg differ
diff --git a/resources/character-img/莱依拉/02.jpg b/resources/character-img/莱依拉/02.jpg
new file mode 100644
index 00000000..2e3c1006
Binary files /dev/null and b/resources/character-img/莱依拉/02.jpg differ
diff --git a/resources/character-img/莱依拉/03.jpg b/resources/character-img/莱依拉/03.jpg
new file mode 100644
index 00000000..d217b69b
Binary files /dev/null and b/resources/character-img/莱依拉/03.jpg differ
diff --git a/resources/character-img/莱依拉/04.jpg b/resources/character-img/莱依拉/04.jpg
new file mode 100644
index 00000000..4bb44673
Binary files /dev/null and b/resources/character-img/莱依拉/04.jpg differ
diff --git a/resources/character/character-card.html b/resources/character/character-card.html
index 27c3d0b4..6d607471 100644
--- a/resources/character/character-card.html
+++ b/resources/character/character-card.html
@@ -86,6 +86,8 @@
{{else}}
{{if custom}}
自定义角色暂无角色信息
+ {{else if !arrive}}
+ 角色尚未实装,暂无信息
{{else}}
未能获取到角色信息,请将角色放置在米游社角色展柜中
{{/if}}
diff --git a/resources/meta/character/妮露/data.json b/resources/meta/character/妮露/data.json
index 9bb77fe7..6f254513 100644
--- a/resources/meta/character/妮露/data.json
+++ b/resources/meta/character/妮露/data.json
@@ -44,5 +44,6 @@
"normal": "孢囊晶尘",
"talent": "「笃行」的哲学",
"weekly": "祸神之禊泪"
- }
+ },
+ "eta": 1665741600000
}
\ No newline at end of file
diff --git a/resources/meta/character/纳西妲/data.json b/resources/meta/character/纳西妲/data.json
index 8c4a095c..f8fd3d3a 100644
--- a/resources/meta/character/纳西妲/data.json
+++ b/resources/meta/character/纳西妲/data.json
@@ -2,7 +2,7 @@
"id": 10000073,
"name": "纳西妲",
"abbr": "纳西妲",
- "title": "???",
+ "title": "白草净华",
"star": 5,
"elem": "dendro",
"allegiance": "???",
@@ -40,5 +40,6 @@
"normal": "孢囊晶尘",
"talent": "「巧思」的哲学",
"weekly": "???"
- }
+ },
+ "eta": 1667358000000
}
\ No newline at end of file
diff --git a/resources/meta/character/莱依拉/data.json b/resources/meta/character/莱依拉/data.json
index 755dbb5b..2c585c1a 100644
--- a/resources/meta/character/莱依拉/data.json
+++ b/resources/meta/character/莱依拉/data.json
@@ -2,7 +2,7 @@
"id": 10000074,
"name": "莱依拉",
"abbr": "莱依拉",
- "title": "???",
+ "title": "绮思晚星",
"star": 4,
"elem": "hydro",
"allegiance": "???",
@@ -40,5 +40,6 @@
"normal": "禁咒绘卷",
"talent": "「巧思」的哲学",
"weekly": "???"
- }
+ },
+ "eta": 1667358000000
}
\ No newline at end of file
diff --git a/resources/meta/material/data.json b/resources/meta/material/data.json
index 054f6317..ffd9bd02 100644
--- a/resources/meta/material/data.json
+++ b/resources/meta/material/data.json
@@ -1274,7 +1274,7 @@
"star": 4
},
"???": {
- "id": "n113041",
+ "id": "n113042",
"name": "???",
"type": "weekly",
"star": 5
diff --git a/tools/char-data-sprider.js b/tools/char-data-sprider.js
index dab4c2e5..6096e706 100644
--- a/tools/char-data-sprider.js
+++ b/tools/char-data-sprider.js
@@ -157,6 +157,9 @@ async function saveCharData (id, key, name = '', force = false, _id = id) {
if (checkName(name) && !force) {
return
}
+ if (eta[name]) {
+ data.eta = new Date(eta[name]) * 1
+ }
let charPath = `${_path}/plugins/miao-plugin/resources/meta/character/${name}/`
fs.writeFileSync(`${charPath}data.json`, JSON.stringify(data, '', 2))
if (details.length === 1) {
@@ -253,4 +256,9 @@ const charData = {
73: { key: 'nahida', name: '纳西妲' },
74: { key: 'layla', name: '莱依拉' }
}
-await down('73', true)
+let eta = {
+ 妮露: '2022-10-14 18:00:00',
+ 纳西妲: '2022-11-02 11:00:00',
+ 莱依拉: '2022-11-02 11:00:00'
+}
+await down('73,74', true)
diff --git a/tools/sprider/CharData.js b/tools/sprider/CharData.js
index 698a71a1..7df6dcfd 100644
--- a/tools/sprider/CharData.js
+++ b/tools/sprider/CharData.js
@@ -1,5 +1,6 @@
import abbr from './abbr.js'
import lodash from 'lodash'
+import fixData from './fixData.js'
let costumes = {
琴: [200301], // 琴
@@ -9,20 +10,6 @@ let costumes = {
迪卢克: [201601], // 迪卢克
菲谢尔: [203101], // 菲谢尔
}
-const fixData = {
- 4: {
- id: 20000000,
- title: '异界的旅人',
- cncv: '宴宁/鹿喑',
- jpcv: '悠木碧/堀江瞬'
- },
- 5: {
- title: '异界的旅人'
- },
- 7: {
- title: '异界的旅人'
- }
-}
const CharData = {
getBasic ($, id, name = '', _id = id) {
diff --git a/tools/sprider/fixData.js b/tools/sprider/fixData.js
new file mode 100644
index 00000000..f9c9c6f2
--- /dev/null
+++ b/tools/sprider/fixData.js
@@ -0,0 +1,20 @@
+export default {
+ 4: {
+ id: 20000000,
+ title: '异界的旅人',
+ cncv: '宴宁/鹿喑',
+ jpcv: '悠木碧/堀江瞬'
+ },
+ 5: {
+ title: '异界的旅人'
+ },
+ 7: {
+ title: '异界的旅人'
+ },
+ 73: {
+ title: '白草净华'
+ },
+ 74: {
+ title: '绮思晚星'
+ }
+}