This commit is contained in:
aozhiwei 2024-11-22 13:34:48 +08:00
parent 8067d495bd
commit 66f9775489
2 changed files with 4 additions and 0 deletions

View File

@ -75,6 +75,7 @@ func (this *BagApi) UseItem(c *gin.Context) {
f5.RspErr(c, 500, "cant use") f5.RspErr(c, 500, "cant use")
return return
} }
service.Buff.Add(s.GetAccountId(), itemMeta.GetBuffList())
bagItem.DecItemNum(bagItem.ItemNum, int32(nowTime)) bagItem.DecItemNum(bagItem.ItemNum, int32(nowTime))
c.JSON(200, rspObj) c.JSON(200, rspObj)
} }

View File

@ -22,3 +22,6 @@ func (this *buff) List(accountId string) (error, []*model.Buff) {
"account_id = ?", accountId).Find(&buffs) "account_id = ?", accountId).Find(&buffs)
return result.Error, buffs return result.Error, buffs
} }
func (this *buff) Add(accountId string, buffList []int32) {
}