From 981da549c775faaed28e75575433308085a609f4 Mon Sep 17 00:00:00 2001 From: 1 <1@72wo.cn> Date: Fri, 19 Sep 2025 06:25:09 +0000 Subject: [PATCH] =?UTF-8?q?feat(fight):=20=E6=96=B0=E5=A2=9E=E7=8E=A9?= =?UTF-8?q?=E5=AE=B6=E7=89=B9=E6=95=88=E9=85=8D=E7=BD=AE=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E7=B2=BE=E7=81=B5=E7=89=B9=E6=95=88=E7=94=9F=E6=88=90?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/data/xmlres/file.go | 20 +++++++++++++------- modules/blazing/model/pet.go | 15 ++++++++++----- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/common/data/xmlres/file.go b/common/data/xmlres/file.go index a30faefd..4318b047 100644 --- a/common/data/xmlres/file.go +++ b/common/data/xmlres/file.go @@ -31,10 +31,11 @@ var ( //Monster MonsterRoot //野怪配置 MonsterMap map[int]TMapConfig //Skill MovesTbl //技能配置 - SkillMap map[int]Move - PetMAP map[int]PetInfo //宠物配置 - NatureRootMap map[int]NatureItem - EffectMAP map[int]NewSeIdx + SkillMap map[int]Move + PetMAP map[int]PetInfo //宠物配置 + NatureRootMap map[int]NatureItem + EffectMAP map[int]NewSeIdx + PlayerEffectMAP map[int]NewSeIdx ) func initfile() { @@ -81,10 +82,15 @@ func initfile() { EffectMAP[gconv.Int(v.Idx)] = v } - // EffectMAP = utils.ToMap[NewSeIdx, int](EffectMAP1.SeIdxList, func(m NewSeIdx) int { - // return gconv.Int(m.Idx) + PlayerEffectMAP = make(map[int]NewSeIdx) + for _, v := range EffectMAP1.SeIdxList { + if gconv.Int(v.Stat) == 1 && gconv.Int(v.StarLevel) == 0 { + v.ArgsS = ParseSideEffectArgs(v.Args) - // }) + PlayerEffectMAP[gconv.Int(v.Idx)] = v + } + + } } diff --git a/modules/blazing/model/pet.go b/modules/blazing/model/pet.go index 761b38d7..b218cdc2 100644 --- a/modules/blazing/model/pet.go +++ b/modules/blazing/model/pet.go @@ -94,11 +94,16 @@ func GenPetInfo(id int, dv, natureId, abilityTypeEnum, shinyid, level []int) *Pe if abilityTypeEnum != nil { - rrr := xmlres.EffectMAP[RandomInRange(abilityTypeEnum)+1006] - p.EffectInfo = append(p.EffectInfo, PetEffectInfo{ - EID: uint16(gconv.Int16(rrr.Eid)), - Args: rrr.ArgsS, - }) + for i, v := range xmlres.PlayerEffectMAP { + if RandomInRange(abilityTypeEnum) == i { + p.EffectInfo = append(p.EffectInfo, PetEffectInfo{ + EID: uint16(gconv.Int16(v.Eid)), + Args: v.ArgsS, + }) + } + + } + //p.EffectInfo[0].Args = []int{petxml.Type, 5} //默认等级1 }