public DeadPlayer(PlayerControl player, DateTime timeOfDeath, DeathReason deathReason, PlayerControl killerIfExisting) { this.player = player; this.timeOfDeath = timeOfDeath; this.deathReason = deathReason; this.killerIfExisting = killerIfExisting; }
public static bool Prefix(InnerPlayerControl __instance, EGHDCAKGMKI AMGCOJNIHLM) { if (AmongUsClient.Instance.ClientId == AmongUsClient.Instance.HostId) { __instance.FIMGDJOCIGD.IAGJEKLJCCI = true; Player player = PlayerController.getPlayerById(__instance.PlayerId); if (player.hasComponent("Love") && CustomGameOptions.BothLoversDie) { Love love = (Love)player.GetComponentByName("Love"); MessageWriter writer = AmongUsClient.Instance.StartRpc(InnerPlayerControl.LocalPlayer.NetId, (byte)CustomRPC.LoveSuicide, Hazel.SendOption.Reliable); writer.Write((byte)love.lover.playerdata.PlayerId); writer.EndMessage(); love.lover.playerdata.MurderPlayer(love.lover.playerdata); } } return(true); }