修改剧本运行bug

This commit is contained in:
joylink_zhangsai 2022-10-09 15:09:17 +08:00
parent 11d4f7b154
commit 7112697216

View File

@ -228,7 +228,10 @@ public class CompetitionAndScriptManager {
case Conversation: case Conversation:
if (unfinishedAction.isAudioPlaying()) { 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())) { // 会话人员全部是机器人 if (conversation.getMemberList().stream().allMatch(m -> m.getMember().isRobot())) { // 会话人员全部是机器人
unfinishedAction.finish(); unfinishedAction.finish();
} }