refactor(fight): 优化战斗逻辑代码结构,清理冗余代码
This commit is contained in:
@@ -4,10 +4,11 @@ import (
|
||||
"blazing/common/data/xmlres"
|
||||
"blazing/common/socket/errorcode"
|
||||
"blazing/common/utils"
|
||||
|
||||
"blazing/logic/service/pet"
|
||||
"blazing/logic/service/player"
|
||||
|
||||
"github.com/samber/lo"
|
||||
|
||||
"blazing/modules/blazing/model"
|
||||
|
||||
"github.com/jinzhu/copier"
|
||||
@@ -187,7 +188,9 @@ func (h Controller) SetPetSkill(data *pet.ChangeSkillInfo, c *player.Player) (re
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
onpet.SkillList = lo.UniqBy(onpet.SkillList, func(s model.SkillInfo) int {
|
||||
return int(s.ID)
|
||||
})
|
||||
return &pet.ChangeSkillOutInfo{
|
||||
CatchTime: data.CatchTime,
|
||||
}, 0
|
||||
|
||||
Reference in New Issue
Block a user