猫猫回礼增加宠物币奖励

This commit is contained in:
hahwu 2026-04-13 15:58:00 +08:00
parent 82636c7dd6
commit 2bf8a710a4
2 changed files with 4 additions and 1 deletions

View File

@ -981,7 +981,7 @@ func (p *PlayroomMod) ShopBuy(id, num int, weeklyDiscount bool) ([]*item.Item, [
if addItemId == 0 {
return nil, nil, fmt.Errorf("ShopBuy AddItemId is 0")
}
if costItem == nil || len(costItem) == 0 {
if len(costItem) == 0 {
return nil, nil, fmt.Errorf("ShopBuy CostItem is nil or length is 0")
}
newCostItem := costItem[0].Num * num

View File

@ -5017,6 +5017,9 @@ func ReqCatReturnGiftReward(player *Player, req *msg.ReqCatReturnGiftReward) err
if score >= int(v.Total) && reward < int(v.Id) {
items = append(items, item.MsgToItem(v.Reward)...)
maxRewardId = max(maxRewardId, int(v.Id))
if v.StarReward > 0 {
items = append(items, item.NewItem(GoUtil.FormatStarItemNum(int(v.StarReward), player.GetOrderFactor()), 1))
}
}
}
if len(items) == 0 {