战斗切精灵失效bug待修复

This commit is contained in:
2025-09-07 05:58:47 +08:00
parent 9d2de92dd6
commit e111e08638
6 changed files with 330 additions and 209 deletions

View File

@@ -54,7 +54,7 @@ func (h *Controller) PetRelease(
t := blservice.NewUserService(c.Info.UserID).PetM(int(data.CatchTime), int(data.Flag))
switch data.Flag {
case 0:
//todo 仓库
removeIndex := -1
for i, v := range c.Info.PetList {
if v.CatchTime == uint32(data.CatchTime) {
@@ -66,16 +66,16 @@ func (h *Controller) PetRelease(
if removeIndex != -1 {
c.Info.PetList = append(c.Info.PetList[:removeIndex], c.Info.PetList[removeIndex+1:]...)
}
if len(c.Info.PetList) > 0 {
result.FirstPetTime = c.Info.PetList[0].CatchTime //设置首发
}
case 1:
//todo 背包
c.Info.PetList = append(c.Info.PetList, t)
result.PetInfo = t
}
}
if len(c.Info.PetList) > 0 {
result.FirstPetTime = c.Info.PetList[0].CatchTime //设置首发
}
//service.NewUserService(c.Info.UserID).PetAdd( *r)
return result, 0
}