From 8147d3c17261d1f21335487d1f1b48366ffc099b Mon Sep 17 00:00:00 2001 From: Gurge44 Date: Sun, 22 Feb 2026 12:47:14 +0100 Subject: [PATCH] zs --- Roles/Standard/Neutral/Killing/QuizMaster.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Roles/Standard/Neutral/Killing/QuizMaster.cs b/Roles/Standard/Neutral/Killing/QuizMaster.cs index 9a9c4f26f..a02e336d0 100644 --- a/Roles/Standard/Neutral/Killing/QuizMaster.cs +++ b/Roles/Standard/Neutral/Killing/QuizMaster.cs @@ -307,7 +307,7 @@ internal class QuizMaster : RoleBase if (CurrentQuestion.CorrectAnswerIndex == index) { - if (pc != null) RPC.PlaySoundRPC(pc.PlayerId, Sounds.TaskComplete); + if (pc) RPC.PlaySoundRPC(pc.PlayerId, Sounds.TaskComplete); Utils.SendMessage(Translator.GetString("QuizMaster.AnswerCorrect"), Target, Translator.GetString("QuizMaster.Title"), importance: MessageImportance.High); Utils.SendMessage(string.Format(Translator.GetString("QuizMaster.AnswerCorrect.Self"), CurrentQuestion.Answers[CurrentQuestion.CorrectAnswerIndex]), QuizMasterId, Translator.GetString("QuizMaster.Title"), importance: MessageImportance.High); @@ -318,9 +318,9 @@ internal class QuizMaster : RoleBase Utils.SendMessage(string.Format(Translator.GetString("QuizMaster.AnswerIncorrect"), CurrentQuestion.Answers[CurrentQuestion.CorrectAnswerIndex]), Target, Translator.GetString("QuizMaster.Title"), importance: MessageImportance.High); Utils.SendMessage(string.Format(Translator.GetString("QuizMaster.AnswerIncorrect.Self"), CurrentQuestion.Answers[index], CurrentQuestion.Answers[CurrentQuestion.CorrectAnswerIndex]), QuizMasterId, Translator.GetString("QuizMaster.Title"), importance: MessageImportance.High); - if (pc.Is(CustomRoles.Pestilence)) return; + if (!pc || pc.Is(CustomRoles.Pestilence)) return; Main.PlayerStates[Target].deathReason = PlayerState.DeathReason.WrongAnswer; - pc?.RpcGuesserMurderPlayer(); + pc.RpcGuesserMurderPlayer(); Utils.AfterPlayerDeathTasks(pc, true); Logger.Info($"Player {name} was killed for answering incorrectly", "QuizMaster");