update apps/profile/ProfileChange.js.

Signed-off-by: liangshi <1142607614@qq.com>
This commit is contained in:
liangshi 2024-04-17 08:57:50 +00:00 committed by Gitee
parent d00936d692
commit 9cd43d4852
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -128,9 +128,9 @@ const ProfileChange = {
} }
// 匹配武器 // 匹配武器
let wRet = /^(?:等?级?([1-9][0-9])?级?)?\s*(?:([1-5一二三四五满])?(?:(精炼?)|(叠影?))([1-5一二三四五])?)?\s*(?:等?级?([1-9][0-9])?级?)?\s*(.*)$/.exec(txt) let wRet = /^(?:等?级?([1-9][0-9])?级?)?\s*(?:([1-5一二三四五满])(精炼?|叠影?)|(精炼?|叠影?)([1-5一二三四五]))?\s*(?:等?级?([1-9][0-9])?级?)?\s*(.*)$/.exec(txt)
if (wRet && wRet[7]) { if (wRet && wRet[7]) {
let weaponName = wRet[2] ? lodash.trim(wRet[5]+wRet[7]) : lodash.trim(wRet[7]) let weaponName = lodash.trim(wRet[7])
let weapon = Weapon.get(weaponName, game, ret.char.game) let weapon = Weapon.get(weaponName, game, ret.char.game)
if (weapon || weaponName === '武器' || Weapon.isWeaponSet(weaponName)) { if (weapon || weaponName === '武器' || Weapon.isWeaponSet(weaponName)) {
let affix = wRet[2] || wRet[5] let affix = wRet[2] || wRet[5]