fix Stained for nhmc

This commit is contained in:
Gurge44 committed 2026-03-08 09:27:45 +01:00
1 parent d063e4604e
commit fa0a69184e
2 files changed
+11 -1

No files matched your search

+8
View File
@@ -162,6 +162,7 @@ public enum CustomRPC
Deadlined,
Blessed,
Necronomicon,
Stained,
// Game Modes
RoomRushDataSync,
@@ -1357,6 +1358,13 @@ internal static class RPCHandlerPatch
covenRole.HasNecronomicon = true;
break;
}
case CustomRPC.Stained:
{
byte id = reader.ReadByte();
Stained.VioletNameList.Add(id);
LateTask.New(() => Stained.VioletNameList.Remove(id), 3f);
break;
}
}
}
catch (Exception e) { Utils.ThrowException(e); }
+3 -1
View File
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using EHR.Modules;
namespace EHR.Roles;
@@ -14,10 +15,11 @@ internal class Stained : IAddon
public static void OnDeath(PlayerControl pc, PlayerControl killer)
{
if (killer == null || pc == null || pc.PlayerId == killer.PlayerId || !killer.IsAlive() || !GameStates.IsInTask) return;
if (!killer || !pc || pc.PlayerId == killer.PlayerId || !killer.IsAlive() || !GameStates.IsInTask) return;
VioletNameList.Add(killer.PlayerId);
Utils.NotifyRoles(SpecifyTarget: killer);
Utils.SendRPC(CustomRPC.Stained, killer.PlayerId);
LateTask.New(() =>
{