feat(fight): 新增玩家特效配置并优化精灵特效生成逻辑
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user