refactor: 重构战斗初始化传递宠物列表
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
This commit is contained in:
@@ -39,6 +39,19 @@ func (p *baseplayer) GetInfo() *model.PlayerInfo {
|
||||
return p.Info
|
||||
}
|
||||
|
||||
func (p *baseplayer) GetPetInfo(limitlevel uint32) []model.PetInfo {
|
||||
|
||||
var ret []model.PetInfo
|
||||
|
||||
for _, pet := range p.Info.PetList {
|
||||
if limitlevel > 0 {
|
||||
pet.Level = utils.Min(pet.Level, limitlevel)
|
||||
ret = append(ret, pet)
|
||||
}
|
||||
|
||||
}
|
||||
return ret
|
||||
}
|
||||
func (f *baseplayer) InvitePlayer(ff common.PlayerI) {
|
||||
|
||||
}
|
||||
@@ -82,10 +95,6 @@ func (f *baseplayer) SendPackCmd(_ uint32, _ any) {
|
||||
|
||||
}
|
||||
|
||||
func (p *baseplayer) GetPetInfo() []model.PetInfo {
|
||||
|
||||
return p.Info.PetList
|
||||
}
|
||||
func (p *baseplayer) ItemAdd(ItemId, ItemCnt int64) (result bool) {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user