diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/competition/CompetitionAndScriptManager.java b/src/main/java/club/joylink/rtss/simulation/cbtc/competition/CompetitionAndScriptManager.java index 6f73898e5..a88003496 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/competition/CompetitionAndScriptManager.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/competition/CompetitionAndScriptManager.java @@ -228,7 +228,10 @@ public class CompetitionAndScriptManager { case Conversation: if (unfinishedAction.isAudioPlaying()) { // 获取当前会话 - Conversation conversation = simulation.getSimulationConversationMap().get(unfinishedAction.getConversationId()); + Conversation conversation = simulation.findValidConversationBySimulationMember(unfinishedAction.getMember()); + if (conversation == null) { + throw new SimulationException(SimulationExceptionType.System_Fault, "剧本会话动作执行所需会话未创建"); + } if (conversation.getMemberList().stream().allMatch(m -> m.getMember().isRobot())) { // 会话人员全部是机器人 unfinishedAction.finish(); }