This commit is contained in:
Gurge44 committed 2026-02-22 12:47:14 +01:00
1 parent b790f9a32e
commit 8147d3c172
1 file changed
+3 -3
+3 -3
View File
@@ -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");