This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
|||||||
// c: 当前玩家对象
|
// c: 当前玩家对象
|
||||||
// 返回: 空结果和错误码
|
// 返回: 空结果和错误码
|
||||||
func (h Controller) ItemSale(data *item.C2S_ITEM_SALE, c *player.Player) (result *fight.NullOutboundInfo, err errorcode.ErrorCode) {
|
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
|
return nil, errorcode.ErrorCodes.ErrSystemError
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ func (h Controller) GetUserItemList(data *item.ItemListInboundInfo, c *player.Pl
|
|||||||
for _, itemData := range items {
|
for _, itemData := range items {
|
||||||
itemInfo := model.SingleItemInfo{
|
itemInfo := model.SingleItemInfo{
|
||||||
ItemId: itemData.ItemId,
|
ItemId: itemData.ItemId,
|
||||||
ItemCnt: itemData.ItemCnt,
|
ItemCnt: uint32(itemData.ItemCnt),
|
||||||
LeftTime: ItemDefaultLeftTime,
|
LeftTime: ItemDefaultLeftTime,
|
||||||
}
|
}
|
||||||
if itemInfo.ItemCnt != 0 {
|
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]
|
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
|
return nil, errorcode.ErrorCodes.ErrInsufficientItemsMulti
|
||||||
}
|
}
|
||||||
if evinfo.EvolvItem != 0 {
|
if evinfo.EvolvItem != 0 {
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ func (h Controller) GetAllFurniture(data *room.FitmentAllInboundEmpty, c *player
|
|||||||
for _, item := range items {
|
for _, item := range items {
|
||||||
var itemInfo room.FitmentItemInfo
|
var itemInfo room.FitmentItemInfo
|
||||||
itemInfo.Id = item.ItemId
|
itemInfo.Id = item.ItemId
|
||||||
itemInfo.AllCount = item.ItemCnt
|
itemInfo.AllCount = uint32(item.ItemCnt)
|
||||||
i, ok := roomData.UsedItems[item.ItemId]
|
i, ok := roomData.UsedItems[item.ItemId]
|
||||||
if ok {
|
if ok {
|
||||||
itemInfo.UsedCount = i
|
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)
|
println(p.Info.UserID, "物品超过拥有最大限制", ItemId)
|
||||||
t1 := common.NewTomeeHeader(2601, p.Info.UserID)
|
t1 := common.NewTomeeHeader(2601, p.Info.UserID)
|
||||||
|
|||||||
Reference in New Issue
Block a user