``refactor(player): 统一将UseCoins方法重命名为GetCoins并优化宠物融合扣费逻辑``
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user