diff --git a/logic/controller/action_扭蛋.go b/logic/controller/action_扭蛋.go index f4e153d0c..06e4ecd8a 100644 --- a/logic/controller/action_扭蛋.go +++ b/logic/controller/action_扭蛋.go @@ -21,7 +21,7 @@ func (h Controller) EggGamePlay(data1 *egg.C2S_EGG_GAME_PLAY, c *player.Player) data1.EggNum = 10 } r := c.Service.Item.CheakItem(400501) - if r < uint32(data1.EggNum) { + if r < int32(data1.EggNum) { return nil, errorcode.ErrorCode(errorcode.ErrorCodes.ErrGachaTicketsInsufficient) } diff --git a/modules/player/model/item.go b/modules/player/model/item.go index b41c422b1..0e5f0b7ce 100644 --- a/modules/player/model/item.go +++ b/modules/player/model/item.go @@ -15,7 +15,7 @@ type Item struct { BindPet uint32 `json:"bind_pet"` //绑定的精灵 // 物品数量, - ItemCnt uint32 `json:"item_cnt"` + ItemCnt int32 `json:"item_cnt"` } type SingleItemInfo struct { diff --git a/modules/player/service/item.go b/modules/player/service/item.go index 74f2ecae2..b63673e50 100644 --- a/modules/player/service/item.go +++ b/modules/player/service/item.go @@ -21,7 +21,7 @@ func (s *ItemService) Get(min, max uint32) []model.Item { } func (s *ItemService) UPDATE(id uint32, count int) { if cool.Config.ServerInfo.IsVip != 0 && count < 0 { - + return } m := s.TestModel(s.Model) @@ -45,7 +45,7 @@ func (s *ItemService) UPDATE(id uint32, count int) { } -func (s *ItemService) CheakItem(id uint32) uint32 { +func (s *ItemService) CheakItem(id uint32) int32 { var ttt model.Item m := s.TestModel(s.Model)