附魔导入 装备基础信息导入
This commit is contained in:
@@ -26,7 +26,7 @@ export interface ICharacterInfo {
|
||||
name: string
|
||||
equVersion: string
|
||||
equips: IEquipment[]
|
||||
enchantings: IEnchantingInfo[]
|
||||
enchants: IEnchantingInfo[]
|
||||
emblems: IEnchantingInfo[]
|
||||
weapons: string[]
|
||||
skills: ISkill[]
|
||||
@@ -65,10 +65,10 @@ export interface ISuit {
|
||||
|
||||
export interface IEnchantingInfo {
|
||||
id: string | number
|
||||
maxFame: number | undefined
|
||||
fame: number | undefined
|
||||
position: string[]
|
||||
props: string
|
||||
type: string | undefined
|
||||
rarity: string | undefined
|
||||
rate: number
|
||||
detail: string
|
||||
categorize: string[]
|
||||
rarity?: string
|
||||
type?: string
|
||||
}
|
||||
|
||||
@@ -30,14 +30,14 @@ export default defineComponent({
|
||||
const basicInfoStore = useInfoStore()
|
||||
|
||||
const enchanting_list = computed<IEnchantingInfo[] | undefined>(() => {
|
||||
return basicInfoStore.enchantings
|
||||
return basicInfoStore.enchants
|
||||
?.filter(
|
||||
(item) =>
|
||||
item.position.includes(props.part) &&
|
||||
!item.position.includes('武器装扮') &&
|
||||
!item.position.includes('宠物装备'),
|
||||
)
|
||||
.sort((a, b) => b.rate - a.rate)
|
||||
.sort((a, b) => (b.fame ?? 0) - (a.fame ?? 0))
|
||||
})
|
||||
|
||||
const emblem_list = computed<IEnchantingInfo[] | undefined>(() => {
|
||||
@@ -68,7 +68,7 @@ export default defineComponent({
|
||||
|
||||
if (global_change.value) {
|
||||
if (name === 'enchanting') {
|
||||
const enchant = basicInfoStore?.enchantings?.find((item) => item.id == val) as
|
||||
const enchant = basicInfoStore?.enchants?.find((item) => item.id == val) as
|
||||
| IEnchantingInfo
|
||||
| undefined
|
||||
if (enchant?.position) {
|
||||
@@ -177,7 +177,7 @@ export default defineComponent({
|
||||
<calc-select v-model={enchanting.value} class="flex-1 !h-20px">
|
||||
<calc-option value={0}>无</calc-option>
|
||||
{renderList(enchanting_list.value ?? [], (item) => (
|
||||
<calc-option value={item.id}>{item.props}</calc-option>
|
||||
<calc-option value={item.id}>{item.detail}</calc-option>
|
||||
))}
|
||||
</calc-select>
|
||||
</div>
|
||||
@@ -193,7 +193,7 @@ export default defineComponent({
|
||||
{renderList(emblem_list.value ?? [], (item) => (
|
||||
<calc-option
|
||||
value={item.id}
|
||||
>{`${item.rarity}${item.type}徽章[${item.props}]`}</calc-option>
|
||||
>{`${item.rarity}${item.type}徽章[${item.detail}]`}</calc-option>
|
||||
))}
|
||||
</calc-select>
|
||||
{has_emblem_1.value && (
|
||||
@@ -202,7 +202,7 @@ export default defineComponent({
|
||||
{renderList(emblem_list.value ?? [], (item) => (
|
||||
<calc-option
|
||||
value={item.id}
|
||||
>{`${item.rarity}${item.type}徽章[${item.props}]`}</calc-option>
|
||||
>{`${item.rarity}${item.type}徽章[${item.detail}]`}</calc-option>
|
||||
))}
|
||||
</calc-select>
|
||||
)}
|
||||
|
||||
@@ -71,34 +71,41 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
const renderSkill = (skill: ISkill, index: number) => (
|
||||
<>
|
||||
<div class="relative w-35px h-55px">
|
||||
{activeSkill.value == skill.id && renderSkillAction(skill)}
|
||||
<div
|
||||
class="w-34px absolute h-auto flex flex-col gap-2px py-2px items-center bg-#2c2d2c rounded-2px z-2 top-1px left-1px"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
chooseSkill(skill)
|
||||
}}
|
||||
onContextmenu={(e) => {
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
chooseSkill(skill, 'sub')
|
||||
}}
|
||||
key={index}
|
||||
>
|
||||
<img
|
||||
class={['h-30px w-30px', skill.type === 'passive' ? 'passive' : '']}
|
||||
src={getImageURL(skill.icon)}
|
||||
></img>
|
||||
<div class="w-30px mx-2px bg-black text-white flex items-center justify-center rounded-2px">
|
||||
{lvInfo.value?.[skill.id.toString()]?.lv ?? 0}
|
||||
const renderSkill = (skill: ISkill, index: number) => {
|
||||
const info = lvInfo.value?.[skill.id.toString()]
|
||||
let color = 'white'
|
||||
if (info?.lv < skill.maxLearnLv) color = '#32E432'
|
||||
if (info?.lv > skill.maxLearnLv) color = '#58E0FC'
|
||||
return (
|
||||
<>
|
||||
<div class="relative w-35px h-55px">
|
||||
{activeSkill.value == skill.id && renderSkillAction(skill)}
|
||||
<div
|
||||
class="w-34px absolute h-auto flex flex-col gap-2px py-2px items-center bg-#2c2d2c rounded-2px z-2 top-1px left-1px"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
chooseSkill(skill)
|
||||
}}
|
||||
onContextmenu={(e) => {
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
chooseSkill(skill, 'sub')
|
||||
}}
|
||||
key={index}
|
||||
>
|
||||
<img
|
||||
class={['h-30px w-30px', skill.type === 'passive' ? 'passive' : '']}
|
||||
src={getImageURL(skill.icon)}
|
||||
></img>
|
||||
<div class="w-30px mx-2px bg-black flex items-center justify-center rounded-2px"
|
||||
style={{color}}>
|
||||
{info?.lv ?? 0}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
const renderSkillAction = (skill: ISkill) => (
|
||||
<>
|
||||
@@ -156,7 +163,8 @@ export default defineComponent({
|
||||
{lvList.map((lv, index) => (
|
||||
<div class="skill-tree-line flex items-center gap-10px px-10px" key={index}>
|
||||
{lv == 1 || lv % 10 == 0 ? (
|
||||
<div class="w-34px h-34px flex items-center justify-center text-white">{lv}</div>
|
||||
<div class="w-34px h-34px flex items-center justify-center text-white"
|
||||
>{lv}</div>
|
||||
) : (
|
||||
<div class="w-34px h-34px"></div>
|
||||
)}
|
||||
|
||||
@@ -21,7 +21,7 @@ export interface IConfig {
|
||||
id: string
|
||||
reinforce: number
|
||||
reinforceType: number
|
||||
enchat: number
|
||||
enchant: number
|
||||
emblem_0: string
|
||||
emblem_1: string
|
||||
upgrade: number
|
||||
@@ -36,7 +36,7 @@ const defaultEqusConfig = {
|
||||
id: '',
|
||||
reinforce: 0,
|
||||
reinforceType: 0,
|
||||
enchat: 0,
|
||||
enchant: 0,
|
||||
emblem_0: "0",
|
||||
emblem_1: "0",
|
||||
upgrade: 0,
|
||||
|
||||
@@ -13,7 +13,7 @@ export const useInfoStore = defineStore("infoStore", ()=>{
|
||||
|
||||
const suits = computed(()=>infos.value?.suits ?? [])
|
||||
|
||||
const enchantings = computed(()=>infos.value?.enchantings?? [])
|
||||
const enchants = computed(()=>infos.value?.enchants ?? [])
|
||||
|
||||
const emblems = computed(()=>infos.value?.emblems?? [])
|
||||
|
||||
@@ -32,7 +32,7 @@ export const useInfoStore = defineStore("infoStore", ()=>{
|
||||
equips,
|
||||
suits,
|
||||
createCharacter,
|
||||
enchantings,
|
||||
enchants,
|
||||
emblems,
|
||||
parts
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user