feat:添加武器升级效果 防具升级效果
This commit is contained in:
+9410
-4926
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@@ -133,9 +133,9 @@ import SuitInfo from '@/components/dnf/Equipment/SuitInfo/index.vue'
|
|||||||
import { formatEqu, formatStone } from './formatData'
|
import { formatEqu, formatStone } from './formatData'
|
||||||
import options from './components/options.vue'
|
import options from './components/options.vue'
|
||||||
|
|
||||||
const props = defineProps<{
|
// const props = defineProps<{
|
||||||
alter: string
|
// alter: string
|
||||||
}>()
|
// }>()
|
||||||
|
|
||||||
const infoStore = useInfoStore()
|
const infoStore = useInfoStore()
|
||||||
const type = ref('equ')
|
const type = ref('equ')
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export const formatEqu = (total: IEquipment[], subweapons?: string[], curSuit?:
|
|||||||
const item_weapon = total.filter((a) => a.itemType == '武器') ?? []
|
const item_weapon = total.filter((a) => a.itemType == '武器') ?? []
|
||||||
const weapons: (IEquipment | undefined)[] = []
|
const weapons: (IEquipment | undefined)[] = []
|
||||||
if (item_weapon.length > 0) {
|
if (item_weapon.length > 0) {
|
||||||
Array.from(new Set(item_weapon.map((item) => item.rarity))).forEach((rarity) => {
|
Array.from(new Set(item_weapon.map((item) => item.rarity))).filter(a=>!['稀有','神器'].includes(a)).forEach((rarity) => {
|
||||||
const weapon = item_weapon
|
const weapon = item_weapon
|
||||||
.filter((item) => item.rarity === rarity)
|
.filter((item) => item.rarity === rarity)
|
||||||
.sort((a, b) => {
|
.sort((a, b) => {
|
||||||
@@ -88,9 +88,9 @@ export const formatEqu = (total: IEquipment[], subweapons?: string[], curSuit?:
|
|||||||
(equip) => equip.categorize.includes('套装') || equip.categorize.includes('通宝'),
|
(equip) => equip.categorize.includes('套装') || equip.categorize.includes('通宝'),
|
||||||
)
|
)
|
||||||
const suits: (IEquipment | undefined)[] = []
|
const suits: (IEquipment | undefined)[] = []
|
||||||
const raritiyList = Array.from(new Set(item_suits.map((item) => item.rarity)))
|
const raritiyList = Array.from(new Set(item_suits.map((item) => item.rarity))).filter(a=>!['稀有','神器'].includes(a))
|
||||||
raritiyList.forEach((rarity) => {
|
raritiyList.forEach((rarity) => {
|
||||||
const armor = item_suits.filter((item) => item.rarity === rarity && item.itemType === '防具')
|
const armor = item_suits.filter((item) => item.rarity === rarity && item.itemType === '防具' && !item.name.includes("侵蚀"))
|
||||||
if (armor.length > 0) {
|
if (armor.length > 0) {
|
||||||
suits.push(...armor, undefined)
|
suits.push(...armor, undefined)
|
||||||
}
|
}
|
||||||
@@ -108,6 +108,7 @@ export const formatEqu = (total: IEquipment[], subweapons?: string[], curSuit?:
|
|||||||
const jewelry = item_suits.filter((item) => item.rarity === rarity && item.itemType === '首饰')
|
const jewelry = item_suits.filter((item) => item.rarity === rarity && item.itemType === '首饰')
|
||||||
const jewelryNormal = jewelry.filter((a) => !a.name.includes('黑牙')) ?? []
|
const jewelryNormal = jewelry.filter((a) => !a.name.includes('黑牙')) ?? []
|
||||||
const jewelryHY = jewelry.filter((a) => a.name.includes('黑牙')) ?? []
|
const jewelryHY = jewelry.filter((a) => a.name.includes('黑牙')) ?? []
|
||||||
|
|
||||||
if (jewelry.length > 0) {
|
if (jewelry.length > 0) {
|
||||||
suits.push(
|
suits.push(
|
||||||
...Array(3 - jewelryHY.length + 2).fill(undefined),
|
...Array(3 - jewelryHY.length + 2).fill(undefined),
|
||||||
@@ -117,6 +118,12 @@ export const formatEqu = (total: IEquipment[], subweapons?: string[], curSuit?:
|
|||||||
)
|
)
|
||||||
suits.push(...Array(rowCount - (suits.length % rowCount)).fill(undefined))
|
suits.push(...Array(rowCount - (suits.length % rowCount)).fill(undefined))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const armorUpgrade = item_suits.filter((item) => item.rarity === rarity && item.itemType === '防具' && item.name.includes("侵蚀"))
|
||||||
|
if (armorUpgrade.length > 0) {
|
||||||
|
suits.push(...armorUpgrade)
|
||||||
|
}
|
||||||
|
|
||||||
if (suits.length % rowCount > 0) {
|
if (suits.length % rowCount > 0) {
|
||||||
suits.push(...Array(rowCount - (suits.length % rowCount)).fill(undefined))
|
suits.push(...Array(rowCount - (suits.length % rowCount)).fill(undefined))
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
Submodule images updated: 5097bd72e3...bac2d054e5
Reference in New Issue
Block a user