``refactor(player): 统一将UseCoins方法重命名为GetCoins并优化宠物融合扣费逻辑``

This commit is contained in:
1
2026-01-03 13:53:38 +00:00
parent 3cce8738cf
commit 77baefef11
7 changed files with 23 additions and 21 deletions

View File

@@ -51,7 +51,7 @@ func (h Controller) PlayerChat(data *user.ChatInboundInfo, player *player.Player
func (h Controller) ChangePlayerColor(data *user.ChangeColorInboundInfo, player *player.Player) (result *user.ChangeColorOutboundInfo, err errorcode.ErrorCode) {
const changeColorCost = 50
if !player.UseCoins(changeColorCost) {
if !player.GetCoins(changeColorCost) {
return nil, errorcode.ErrorCodes.ErrSunDouInsufficient10016
}
@@ -77,7 +77,7 @@ func (h Controller) ChangePlayerColor(data *user.ChangeColorInboundInfo, player
func (h Controller) ChangePlayerDoodle(data *user.ChangeDoodleInboundInfo, player *player.Player) (result *user.ChangeDoodleOutboundInfo, err errorcode.ErrorCode) {
const changeDoodleCost = 50
if !player.UseCoins(changeDoodleCost) {
if !player.GetCoins(changeDoodleCost) {
return nil, errorcode.ErrorCodes.ErrSunDouInsufficient10016
}
@@ -159,4 +159,4 @@ func (h Controller) ChangePlayerCloth(data *item.ChangePlayerClothInboundInfo, p
player.GetSpace().Broadcast(player, data.Head.CMD, result)
return
}
}