refactor: 简化Steam游戏状态检查逻辑
- 移除checkDiffSteamGameStatus中玩家退出游戏的冗余检查 - 优化RoundCheckSteamPlaying中的日志输出 - 删除未使用的代码片段
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user