战斗切精灵失效bug待修复
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user