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

This commit is contained in:
xinian
2026-03-28 16:56:00 +08:00
committed by cnb
parent 308a2adbae
commit 61ccbc6c62

View File

@@ -147,10 +147,12 @@ func (h Controller) BuyGoldItem(data *item.C2S_GOLD_BUY_PRODUCT, player *player.
}
case 1:
if config != nil {
r := player.Service.Talk.Update(int(pro.ProductID), int(data.Count))
if !r {
return nil, errorcode.ErrorCodes.ErrGoldBeanSingleLimit
}
}
if player.ItemAdd(pro.ProductID, data.Count) {
player.User.UpdateGold(player.Info.UserID, -int64(usegold))