Esempio n. 1
0
            public static void HackButtonPress(Glitch __gInstance, KillButtonManager __instance)
            {
                if (__gInstance.HackTarget != null)
                {
                    if (__gInstance.HackTarget.isShielded())
                    {
                        var medic  = __gInstance.HackTarget.getMedic().Player.PlayerId;
                        var writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId,
                                                                                (byte)CustomRPC.AttemptSound, SendOption.Reliable, -1);
                        writer.Write(medic);
                        writer.Write(__gInstance.HackTarget.PlayerId);
                        AmongUsClient.Instance.FinishRpcImmediately(writer);
                        if (CustomGameOptions.ShieldBreaks)
                        {
                            __gInstance.LastHack = DateTime.UtcNow;
                        }

                        StopKill.BreakShield(medic, __gInstance.HackTarget.PlayerId,
                                             CustomGameOptions.ShieldBreaks);

                        return;
                    }

                    __gInstance.LastHack = DateTime.UtcNow;
                    //System.Console.WriteLine("Hacking " + __gInstance.HackTarget.Data.PlayerName + "...");
                    __gInstance.RpcSetHacked(__gInstance.HackTarget);
                }
            }
Esempio n. 2
0
            public static void HackButtonPress(Glitch __gInstance, KillButtonManager __instance)
            {
                if (__gInstance.HackTarget != null)
                {
                    if (__gInstance.HackTarget.isShielded())
                    {
                        Utils.BreakShield(__gInstance.HackTarget);
                        if (CustomGameOptions.ShieldBreaks)
                        {
                            __gInstance.LastHack = DateTime.UtcNow;
                        }

                        return;
                    }

                    __gInstance.LastHack = DateTime.UtcNow;
                    //System.Console.WriteLine("Hacking " + __gInstance.HackTarget.Data.PlayerName + "...");
                    __gInstance.RpcSetHacked(__gInstance.HackTarget);
                }
            }
Esempio n. 3
0
            public static void HackButtonPress(Glitch __gInstance, KillButtonManager __instance)
            {
                if (__gInstance.HackTarget != null)
                {
                    if (__gInstance.HackTarget.isShielded())
                    {
                        if (CustomGameOptions.PlayerMurderIndicator)
                        {
                            var writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId,
                                                                                    (byte)CustomRPC.AttemptSound, Hazel.SendOption.None, -1);
                            writer.Write(__gInstance.HackTarget.PlayerId);
                            AmongUsClient.Instance.FinishRpcImmediately(writer);
                            MedicMod.StopKill.BreakShield(__gInstance.HackTarget.PlayerId, false);
                        }

                        return;
                    }
                    __gInstance.LastHack = DateTime.UtcNow;
                    //System.Console.WriteLine("Hacking " + __gInstance.HackTarget.Data.PlayerName + "...");
                    __gInstance.RpcSetHacked(__gInstance.HackTarget);
                }
            }