Skip to content

Commit

Permalink
修复邪恶的设陷师的击杀冷却
Browse files Browse the repository at this point in the history
  • Loading branch information
mxyx0412 committed Oct 8, 2024
1 parent 4b7b54f commit 016c33e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions TheOtherRoles/Patches/PlayerControlPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2306,18 +2306,19 @@ public static void Postfix(PlayerControl __instance, [HarmonyArgument(0)] Player
}
else if (KillTrap.isTrapped(target) && EvilTrapper.isTrapKill) // トラップキルした場合のペナルティ
{
EvilTrapper.killTimer = GameOptionsManager.Instance.currentNormalGameOptions.KillCooldown;
EvilTrapper.evilTrapper.killTimer = GameOptionsManager.Instance.currentNormalGameOptions.KillCooldown;
HudManagerStartPatch.evilTrapperSetTrapButton.Timer = EvilTrapper.cooldown;
}
else // トラップにかかっていない対象を通常キルした場合はペナルティーを受ける
{
EvilTrapper.killTimer = GameOptionsManager.Instance.currentNormalGameOptions.KillCooldown + EvilTrapper.penaltyTime;
EvilTrapper.evilTrapper.killTimer = GameOptionsManager.Instance.currentNormalGameOptions.KillCooldown + EvilTrapper.penaltyTime;
HudManagerStartPatch.evilTrapperSetTrapButton.Timer = EvilTrapper.cooldown + EvilTrapper.penaltyTime;
}
if (!EvilTrapper.isTrapKill)
{
MessageWriter writer;
writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ClearTrap, SendOption.Reliable, -1);
writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId,
(byte)CustomRPC.ClearTrap, SendOption.Reliable, -1);
AmongUsClient.Instance.FinishRpcImmediately(writer);
RPCProcedure.clearTrap();
}
Expand Down

0 comments on commit 016c33e

Please sign in to comment.