战斗修改
This commit is contained in:
@@ -184,3 +184,22 @@ func (h Controller) SetPetExp(data *pet.PetSetExpInboundInfo, c *player.Player)
|
||||
|
||||
return &pet.PetSetExpOutboundInfo{}, 0
|
||||
}
|
||||
func (h Controller) SetPetSkill(data *pet.ChangeSkillInfo, c *player.Player) (result *pet.ChangeSkillOutInfo, err errorcode.ErrorCode) {
|
||||
_, onpet, ok := FindWithIndex(c.Info.PetList, func(item model.PetInfo) bool {
|
||||
return item.CatchTime == data.CatchTime
|
||||
})
|
||||
if ok {
|
||||
for i := 0; i < 4; i++ {
|
||||
if onpet.SkillList[i].ID == data.HasSkill {
|
||||
onpet.SkillList[i].ID = data.ReplaceSkill
|
||||
onpet.SkillList[i].PP = uint32(xmlres.SkillMap[int(onpet.SkillList[i].ID)].MaxPP)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return &pet.ChangeSkillOutInfo{
|
||||
CatchTime: data.CatchTime,
|
||||
}, 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user