refactor: 简化Steam游戏状态检查逻辑

- 移除checkDiffSteamGameStatus中玩家退出游戏的冗余检查
- 优化RoundCheckSteamPlaying中的日志输出
- 删除未使用的代码片段
This commit is contained in:
lixiangwuxian
2025-03-09 17:44:30 +08:00
parent debc0f6eb4
commit 711c4fd3d6
2 changed files with 1 additions and 21 deletions

View File

@@ -328,17 +328,6 @@ func checkDiffSteamGameStatus(steamID []string, lastTimeStat map[string]string)
}
}
}
// 检查是否有玩家退出游戏
for steamID, lastGameID := range lastTimeStat {
if lastGameID != "" {
if currentGameID, exists := currentGameStatus[steamID]; !exists || currentGameID == "" {
// 玩家已退出游戏,不需要添加到通知列表,但需要更新状态
currentGameStatus[steamID] = ""
}
}
}
return gameStatusListStr, Players, nil
}