Exemple #1
0
        public static void HandleOutlawGameOver(Client client, ref PacketHitList hitList)
        {
            PacketHitList.MethodStart(ref hitList);

            if (client.Player.OutlawRole == Enums.OutlawRole.Outlaw)
            {
                var lostPoints   = client.Player.PlayerData.PendingOutlawPoints % OutlawPointInterval;
                var gainedPoints = client.Player.PlayerData.PendingOutlawPoints - lostPoints;

                client.Player.PlayerData.LockedOutlawPoints += gainedPoints;

                Messenger.PlayerMsg(client, $"You have been defeated! You gained {gainedPoints} points from this round!", Text.BrightGreen);

                Messaging.SendGlobalMessage($"{client.Player.DisplayName} has been captured!", Settings.DiscordOutlawChannel, Text.BrightGreen);
            }

            client.Player.OutlawRole = Enums.OutlawRole.None;
            client.Player.PlayerData.PendingOutlawPoints = 0;

            PacketBuilder.AppendPlayerData(client, hitList);

            PacketHitList.MethodEnded(ref hitList);
        }