mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
fix Stained for nhmc
This commit is contained in:
1 parent
d063e4604e
commit
fa0a69184e
2 files changed
+11
-1
No files matched your search
@@ -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); }
|
||||
|
||||
@@ -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(() =>
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user