面板服务增加由**Snap Hutao**提供的Enka转发代理,可通过#喵喵设置面板服务4进行选择

部分角色资源文件结构调整
This commit is contained in:
Kokomi 2023-04-14 02:56:44 +08:00
parent 730392600b
commit 7f0029ab73
251 changed files with 924 additions and 137 deletions

View File

@ -1,9 +1,9 @@
# 2.3.7
# 2.3.8
* 增加3.6新圣遗物数据及资源
* 增加绮良良的角色信息,可通过`#绮良良天赋`、`#绮良良图鉴`等查看
* 面板服务增加由**Snap Hutao**提供的Enka转发代理可通过`#喵喵设置面板服务4`进行选择
* 部分角色资源文件结构调整
# 2.3.1~2.3.6
# 2.3.1~2.3.7
* 增加`#角色记录``#抽卡统计`功能,可在`#喵喵设置`中开启
* `#角色记录`、`#武器记录`、`#常驻记录` 可查看对应池子的抽卡记录
@ -24,6 +24,8 @@
* 面板更新的提醒文案逻辑优化
* `#雷神面板` 属性部分样式调整,增加圣遗物评分权重展示
* 圣遗物评级的分数上限微调
* 增加3.6新圣遗物数据及资源
* 增加绮良良的角色信息,可通过`#绮良良天赋`、`#绮良良图鉴`等查看
# 2.3.0

View File

@ -7,34 +7,22 @@
* Enka面板服务API配置
*
* Enka官网https://enka.network/
*
* 感谢Enka提供的面板查询服务
* 如果可以的话也可考虑在Patreon上支持Enka
* 感谢Enka提供的面板查询服务如果可以的话也可考虑在Patreon上支持Enka
* Patreonhttps://www.patreon.com/algoinde
*
* 目前使用Miao-Plugin的默认UA请求国服UID时
* 会默认重定向 https://enka.network/ 到 https://profile.microgg.cn/
*
* 感谢@MiniGrayGay 大佬提供的服务(Github: https://github.com/MiniGrayGay)
*
* 使用代理(科学上网)可以配置proxyAgent
* 例如: http://127.0.0.1:1080
*
* */
export const enkaApi = {
url: 'https://enka.network/', // 请求API地址可从上方提供的API地址中进行选择
proxyAgent: '' // 请求的proxy配置如无需proxy则留空
}
/**
* 单个用户请求面板的间隔时间单位分钟
* 不同用户的计时独立
*
* 部分服务会同时返回服务侧更新冷却时间若服务侧查询冷却大于更新间隔
* 会以服务侧查询冷却为准在服务侧冷却时间内即使请求也不会返回更新数据
* */
export const requestInterval = 5
/**
* 喵喵Api 私有的面板更新服务
* 供Yunzai开发者及有投喂的老板们小范围使用
@ -46,3 +34,12 @@ export const miaoApi = {
qq: '在此处填写主人QQ',
token: '在此处填写QQ对应Token'
}
/**
* 单个用户请求面板的间隔时间单位分钟
* 不同用户的计时独立
*
* 部分服务会同时返回服务侧更新冷却时间若服务侧查询冷却大于更新间隔
* 会以服务侧查询冷却为准在服务侧冷却时间内即使请求也不会返回更新数据
* */
export const requestInterval = 5

View File

@ -84,8 +84,8 @@ export const cfgSchema = {
key: '面板服务',
type: 'num',
def: 0,
input: (n) => /[0-3]{1,3}/.test(n) ? n : 0,
desc: '面板服务选择0:自动1:喵Api(需具备Token) 2:Enka-API 3:MiniGG-Api。如设置三位数字则为分服务器设置,按顺序分别为 国服/B服/外服例如112代表国服B服Miao,国外Enka'
input: (n) => /[0-4]{1,3}/.test(n) ? n : 0,
desc: '面板服务选择0:自动1:喵Api(需具备Token) 2:Enka-API 3:MiniGG-Api, 4:Hutao-Enka代理。如设置三位数字则为分服务器设置,按顺序分别为 国服/B服/外服例如112代表国服B服Miao,国外Enka'
},
costumeSplash: {
title: '使用自定义面板插图',

View File

@ -60,7 +60,7 @@ export const characters = {
10000066: ['神里绫人', 'Kamisato Ayato', 'Ayato', '绫人', '神里凌人', '凌人', '0人', '神人', '零人', '大舅哥'],
// 3.0
10000061: ['绮良良', 'Kirara', '大猫猫', '大喵喵', '稻妻猫猫', '绮娘娘', '良良', '快递员'],
10000061: ['绮良良', 'Kirara', '大猫猫', '大喵喵', '稻妻猫猫', '绮娘娘', '琦良良', '良良', '快递员', '草猫', '草猫猫', '草喵', '草喵喵'],
10000069: ['提纳里', 'Tighnari', '提那里', '小提', '驴'],
10000067: ['柯莱', 'Collei', '柯来', '科莱', '科来', '小天使', '须弥安柏', '草安柏', '须弥飞行冠军'],
10000068: ['多莉', 'Dori', '多利', '多力', '奸商'],
@ -100,9 +100,9 @@ export const characters = {
export const wifeData = {
girlfriend: `琴, 丽莎, 荧, 芭芭拉, 安柏, 香菱, 北斗, 凝光, 菲谢尔, 诺艾尔, 甘雨, 莫娜, 刻晴, 砂糖, 辛焱, 罗莎莉亚, 胡桃,
烟绯, 优菈, 神里绫华, 宵宫, 雷电将军, 珊瑚宫心海, 九条裟罗, 八重神子, 埃洛伊, 申鹤, 云堇, 夜兰, 久岐忍, 柯莱, 多莉, 伐难,
女士, 萍姥姥, 归终, 柯莱, 多莉, 仆人, 少女, 妮露, 坎蒂丝, 天理, 迪希雅, 莱依拉, 珐露珊, 迪希雅`,
女士, 萍姥姥, 归终, 仆人, 少女, 妮露, 坎蒂丝, 天理, 迪希雅, 莱依拉, 珐露珊, 绮良良`,
boyfriend: `空, 凯亚, 迪卢克, 雷泽, 温迪, 行秋, 魈, 钟离, 班尼特, 达达利亚, 重云, 阿贝多, 枫原万叶, 托马, 五郎, 荒泷一斗,
鹿野院平藏, 神里绫人, 提纳里, 流浪者, 白术, 提纳里, 富人, 博士, 丑角, 公鸡, 队长, 赛诺, 戴因, 卡维, 艾尔海森, 米卡, 白术`,
鹿野院平藏, 神里绫人, 提纳里, 流浪者, 富人, 博士, 丑角, 公鸡, 队长, 赛诺, 戴因, 卡维, 艾尔海森, 米卡, 白术`,
daughter: '可莉, 七七, 迪奥娜, 早柚, 派蒙, 瑶瑶, 纳西妲',
son: ''
}

View File

@ -28,6 +28,14 @@ export const mggApi = {
}
}
export const requestInterval = 5
export const hutaoApi = {
url: 'http://enka-api.hut.ao/',
userAgent: 'Snap Hutao/miao',
listApi: ({ url, uid, diyCfg }) => {
return `${url}/${uid}/`
}
}
export const requestInterval = 3
export const isSys = true

View File

@ -63,6 +63,7 @@ export default class AvatarData extends Base {
enka: 'Enka.Network',
miao: '喵喵Api',
mgg: 'MiniGG-API',
hutao: 'Hutao-Enka',
mys: '米游社'
}[this._source] || this._source
}

View File

@ -230,7 +230,7 @@ class Character extends Base {
this._imgs = {}
}
if (!this._imgs[cacheId]) {
this._imgs[cacheId] = CharImg.getImgs(this.name, costumeIdx, this.isTraveler ? this.elem : '', this.source === 'amber' ? 'png' : 'webp')
this._imgs[cacheId] = CharImg.getImgs(this.name, costumeIdx, this.isTraveler ? this.elem : '', this.weaponType, this.talentCons)
}
let imgs = this._imgs[cacheId]
return {

View File

@ -82,7 +82,8 @@ const CharImg = {
},
// 获取角色的图像资源数据
getImgs (name, costumeIdx = '', travelerElem = '', fileType = 'webp') {
getImgs (name, costumeIdx = '', travelerElem = '', weaponType = 'sword', talentCons) {
let fileType = 'webp'
costumeIdx = costumeIdx === '2' ? '2' : ''
let imgs = {}
if (!['空', '荧', '旅行者'].includes(name)) {
@ -113,9 +114,9 @@ const CharImg = {
for (let i = 0; i <= 3; i++) {
tAdd(`passive${i}`, `icons/passive-${i}`)
}
for (let k of ['a', 'e', 'q']) {
tAdd(k, `icons/talent-${k}`)
}
imgs.a = `/common/item/atk-${weaponType}.webp`
imgs.e = talentCons.e === 3 ? imgs['cons3'] : imgs['cons5']
imgs.q = talentCons.q === 5 ? imgs['cons5'] : imgs['cons3']
return imgs
}
}

46
models/player/HutaoApi.js Normal file
View File

@ -0,0 +1,46 @@
import lodash from 'lodash'
import EnkaData from './EnkaData.js'
import { Data } from '#miao'
export default {
id: 'hutao',
name: 'Hutao-Enka',
cfgKey: 'hutaoApi',
// 处理请求参数
async request (api) {
let params = {
headers: { 'User-Agent': this.getCfg('userAgent') }
}
return { api, params }
},
// 处理服务返回
async response (data, req) {
if (!data.playerInfo) {
if (data.error) {
console.log(`Enka ReqErr: ${data.error}`)
}
return req.err('error', 60)
}
let details = data.avatarInfoList
if (!details || details.length === 0 || !details[0].propMap) {
return req.err('empty', 5 * 60)
}
return data
},
updatePlayer (player, data) {
player.setBasicData(Data.getData(data, 'name:nickname,face:profilePicture.avatarID,card:nameCardID,level,word:worldLevel,sign:signature'))
lodash.forEach(data.avatarInfoList, (ds) => {
let ret = EnkaData.setAvatar(player, ds, 'hutao')
if (ret) {
player._update.push(ret.id)
}
})
},
// 获取冷却时间
cdTime (data) {
return data.ttl || 60
}
}

View File

@ -5,6 +5,7 @@ import MysAvatar from './MysAvatar.js'
import enkaApi from './EnkaApi.js'
import miaoApi from './MiaoApi.js'
import mggApi from './MggApi.js'
import hutaoApi from './HutaoApi.js'
let { diyCfg } = await Data.importCfg('profile')
@ -15,7 +16,8 @@ const Profile = {
Profile.servs[key] = new ProfileServ({
miao: miaoApi,
mgg: mggApi,
enka: enkaApi
enka: enkaApi,
hutao: hutaoApi
}[key])
}
return Profile.servs[key]
@ -34,7 +36,7 @@ const Profile = {
// 判断国服、B服、外服获取在配置中的idx
let servIdx = { 1: 0, 2: 0, 3: 0, 4: 0, 5: 1, 6: 2, 7: 2, 8: 2, 9: 2 }[uid[0]]
// 获取对应服务选择的配置数字0自动1喵2Enka3Mgg
// 获取对应服务选择的配置数字0自动1喵2Enka3Mgg, 4:Hutao
let servCfg = Cfg.get('profileServer', '0').toString() || '0'
servCfg = servCfg[servIdx] || servCfg[0] || '0'
@ -45,6 +47,8 @@ const Profile = {
return Profile.serv('enka')
} else if (servCfg === '3') {
return Profile.serv('mgg')
} else if (servCfg === '4') {
return Profile.serv('hutao')
}
return Profile.serv(servIdx === 2 ? 'enka' : 'mgg')
},
@ -84,7 +88,7 @@ const Profile = {
isProfile (avatar) {
// 检查数据源
if (!avatar._source || !['enka', 'change', 'miao', 'mgg'].includes(avatar._source)) {
if (!avatar._source || !['enka', 'change', 'miao', 'mgg', 'hutao'].includes(avatar._source)) {
return false
}
// 检查武器及天赋

View File

@ -78,7 +78,7 @@
</div>
<div class="copyright data-source">
数据源:{{ {miao:'喵喵API', 'enka':'Enka.Network', 'mgg':'MiniGG-API', mys:'米游社'}[data.source]||data.source }} {{data.updateTime}}
数据源:{{ {miao:'喵喵API', 'enka':'Enka.Network', 'mgg':'MiniGG-API', mys:'米游社', 'hutao':'Hutao-Enka' }[data.source]||data.source }} {{data.updateTime}}
</div>
{{else}}
{{if custom}}

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

View File

@ -10,8 +10,8 @@
"birth": "7-9",
"astro": "天堂鸟座",
"desc": "须弥著名建筑设计师,对太多事物抱有过度关怀心。美学主义者,为现实所困扰。",
"cncv": "",
"jpcv": "",
"cncv": "刘三木",
"jpcv": "内田雄马",
"costume": false,
"ver": 1,
"baseAttr": {
@ -34,7 +34,7 @@
"specialty": "悼灵花",
"normal": "孢囊晶尘",
"talent": "「巧思」的哲学",
"weekly": ""
"weekly": "原初绿洲之初绽"
},
"eta": 1683021600000
"eta": 1682992800000
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

Some files were not shown because too many files have changed in this diff Show More