This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user