From b438719c34aa4352a97dac4f49d264387e2971ad Mon Sep 17 00:00:00 2001 From: flswld Date: Mon, 10 Apr 2023 19:37:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91=E4=B8=8D?= =?UTF-8?q?=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gs/game/player_stamina.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gs/game/player_stamina.go b/gs/game/player_stamina.go index ab10d675..e4fe70a5 100644 --- a/gs/game/player_stamina.go +++ b/gs/game/player_stamina.go @@ -392,10 +392,9 @@ func (g *Game) SetVehicleStamina(player *model.Player, vehicleEntity *Entity, st // SetPlayerStamina 设置玩家耐力 func (g *Game) SetPlayerStamina(player *model.Player, stamina uint32) { // 设置玩家的耐力 - prop := constant.PLAYER_PROP_CUR_PERSIST_STAMINA - player.PropertiesMap[prop] = stamina + player.PropertiesMap[uint16(constant.PLAYER_PROP_CUR_PERSIST_STAMINA)] = stamina // logger.Debug("player stamina set, stamina: %v", stamina) - g.PlayerPropNotify(player, prop) + g.PlayerPropNotify(player, uint16(constant.PLAYER_PROP_CUR_PERSIST_STAMINA)) } func (g *Game) PlayerPropNotify(player *model.Player, playerPropId uint16) {