1
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
昔念
2026-02-04 00:27:59 +08:00
parent 40057b698d
commit 66e59be70b
5 changed files with 5 additions and 5 deletions

View File

@@ -15,7 +15,7 @@ import (
// c: 当前玩家对象
// 返回: 空结果和错误码
func (h Controller) ItemSale(data *item.C2S_ITEM_SALE, c *player.Player) (result *fight.NullOutboundInfo, err errorcode.ErrorCode) {
if c.Service.Item.CheakItem(data.ItemId) < data.Amount {
if c.Service.Item.CheakItem(data.ItemId) < int32(data.Amount) {
return nil, errorcode.ErrorCodes.ErrSystemError
}

View File

@@ -29,7 +29,7 @@ func (h Controller) GetUserItemList(data *item.ItemListInboundInfo, c *player.Pl
for _, itemData := range items {
itemInfo := model.SingleItemInfo{
ItemId: itemData.ItemId,
ItemCnt: itemData.ItemCnt,
ItemCnt: uint32(itemData.ItemCnt),
LeftTime: ItemDefaultLeftTime,
}
if itemInfo.ItemCnt != 0 {

View File

@@ -28,7 +28,7 @@ func (h Controller) PetELV(data *pet.C2S_PET_EVOLVTION, c *player.Player) (resul
}
evinfo := xmlres.EVOLVMAP[flag].Branches[data.Index-1]
if c.Service.Item.CheakItem(uint32(evinfo.EvolvItem)) < uint32(evinfo.EvolvItemCount) {
if c.Service.Item.CheakItem(uint32(evinfo.EvolvItem)) < int32(evinfo.EvolvItemCount) {
return nil, errorcode.ErrorCodes.ErrInsufficientItemsMulti
}
if evinfo.EvolvItem != 0 {

View File

@@ -60,7 +60,7 @@ func (h Controller) GetAllFurniture(data *room.FitmentAllInboundEmpty, c *player
for _, item := range items {
var itemInfo room.FitmentItemInfo
itemInfo.Id = item.ItemId
itemInfo.AllCount = item.ItemCnt
itemInfo.AllCount = uint32(item.ItemCnt)
i, ok := roomData.UsedItems[item.ItemId]
if ok {
itemInfo.UsedCount = i

View File

@@ -208,7 +208,7 @@ func (p *Player) ItemAdd(ItemId, ItemCnt uint32) (result bool) {
}
if p.Service.Item.CheakItem(ItemId)+ItemCnt > uint32(itemmax) {
if p.Service.Item.CheakItem(ItemId)+int32(ItemCnt) > int32(itemmax) {
println(p.Info.UserID, "物品超过拥有最大限制", ItemId)
t1 := common.NewTomeeHeader(2601, p.Info.UserID)