fix: gs sr角色重名问题

This commit is contained in:
Aluxes 2024-01-29 12:09:19 +08:00
parent eecaefabe1
commit e4faf9d5f1
4 changed files with 7 additions and 7 deletions

View File

@ -22,19 +22,17 @@ export async function groupRank (e) {
mode = /(词条)/.test(msg) ? 'valid' : mode
mode = /(双爆)/.test(msg) ? 'crit' : mode
let name = msg.replace(/(#|星铁|最强|最高分|第一|词条|双爆|极限|最高|最多|最牛|圣遗物|评分|群内|群|排名|排行|面板|面版|详情|榜)/g, '')
let char = Character.get(name)
let game = e.isSr ? 'sr' : 'gs'
let char = Character.get(name, game)
if (!char) {
// 名字不存在或不为列表模式则返回false
if (name || type !== 'list') {
return false
}
}
if (/星铁/.test(msg) || char.isSr) {
e.isSr = true
}
// 对鲸泽佬的极限角色文件增加支持
if (type === 'super') {
let player = Player.create(100000000)
let player = Player.create(100000000, game)
if (player.getProfile(char.id)) {
e.uid = 100000000
if (!char.isRelease && Cfg.get('notReleasedData') === false) {
@ -107,7 +105,7 @@ export async function resetRank (e) {
let charId = ''
let charName = '全部角色'
if (name) {
let char = Character.get(name)
let char = Character.get(name, game)
if (!char) {
e.reply(`重置排名失败,角色:${name}不存在`)
return true

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 KiB

View File

@ -79,5 +79,7 @@ export const usefulAttr = {
芙宁娜: { hp: 100, atk: 0, def: 0, cpct: 100, cdmg: 100, mastery: 45, dmg: 100, phy: 0, recharge: 75, heal: 100 },
夏洛蒂: { hp: 0, atk: 75, def: 0, cpct: 100, cdmg: 100, mastery: 75, dmg: 100, phy: 0, recharge: 75, heal: 100 },
娜维娅: { hp: 0, atk: 75, def: 0, cpct: 100, cdmg: 100, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 0 },
夏沃蕾: { hp: 100, atk: 0, def: 0, cpct: 0, cdmg: 0, mastery: 0, dmg: 0, phy: 0, recharge: 75, heal: 100 }
夏沃蕾: { hp: 100, atk: 0, def: 0, cpct: 100, cdmg: 100, mastery: 0, dmg: 100, phy: 0, recharge: 75, heal: 100 },
闲云: { hp: 0, atk: 100, def: 0, cpct: 100, cdmg: 100, mastery: 0, dmg: 100, phy: 0, recharge: 75, heal: 100 },
嘉明: { hp: 0, atk: 75, def: 0, cpct: 100, cdmg: 100, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 0 }
}