playroom bug修复

This commit is contained in:
hahwu 2025-02-12 10:11:20 +08:00
parent 0c12dd7bc7
commit e7ccaf65d2
2 changed files with 2 additions and 4 deletions

View File

@ -2942,6 +2942,7 @@ func ReqPlayroomInfo(args []interface{}) error {
PlayerData := G_GameLogicPtr.GetSimplePlayerByUid(Targer)
PlayroomMod.SetTarget(Targer)
if PlayerData.Loginout > 0 && PlayerData.Loginout < GoUtil.Now()-int64(playroomCfg.GetGameOutline()) { // todo DEBUG
log.Debug("ReqPlayroomInfo PlayerData.Loginout:%v, %v", PlayerData.Loginout, playroomCfg.GetGameOutline())
PlayroomMod.SetGameId(1)
Star := min(500, max(PlayerData.Star/10, 10))
ChessMod := player.PlayMod.getChessMod()
@ -2971,7 +2972,7 @@ func ReqPlayroomInfo(args []interface{}) error {
PlayroomMod.SetGameId(2)
PlayroomMod.SetGameRewardFlip(int(float64(PlayerData.Star)*0.03), int(float64(PlayerData.Star)*0.05), int(float64(PlayerData.Star)*0.1))
}
player.PlayMod.save()
PlayroomVisit(player, Targer)
return nil
}

View File

@ -189,9 +189,6 @@ func (p *PlayroomMod) SetTarget(Target int) {
}
func (p *PlayroomMod) SetGameId(GameId int) {
if p.GameId != 0 {
return
}
p.GameId = GameId
}