public async void OnPlayerStartMeeting(IPlayerStartMeetingEvent e) { _logger.LogInformation($"Player Started Meeting"); DetectiveGame game = _games[e.Game.Code]; if (e.Body != null && game.Enabled) { _logger.LogInformation($"Body is not null: {e.Body.PlayerInfo.PlayerName}"); IInnerPlayerControl bMurderer = game.Kills[e.Body]; _logger.LogInformation($"Found murderer: {bMurderer.PlayerInfo.PlayerName}"); _logger.LogInformation($"Detective: {game.DetectiveClientId}"); if (e.ClientPlayer.Client.Id == game.DetectiveClientId) { _logger.LogInformation($"Detective found body: {e.PlayerControl.PlayerInfo.PlayerName}"); // Detective found body switch (new Random().Next(1, 4)) { case 1: await e.PlayerControl.SendChatToPlayerAsync($"Impostor was wearing {getSkin(bMurderer.PlayerInfo.SkinId)} on their body."); break; case 2: await e.PlayerControl.SendChatToPlayerAsync($"Impostor was wearing {getHat(bMurderer.PlayerInfo.HatId)} on their head."); break; case 3: await e.PlayerControl.SendChatToPlayerAsync($"Impostor was the color {getColor(bMurderer.PlayerInfo.ColorId)}."); break; case 4: await e.PlayerControl.SendChatToPlayerAsync($"Impostor has {getPet(bMurderer.PlayerInfo.PetId)} for a pet."); break; default: await e.PlayerControl.SendChatToPlayerAsync($"Impostor was unable to be detected"); break; } } } }
public void OnPlayerStartMeetingEvent(IPlayerStartMeetingEvent e) { _logger.LogDebug($"Player {e.PlayerControl.PlayerInfo.PlayerName} start meeting, reason: " + (e.Body == null ? "Emergency call button" : "Found the body of the player " + e.Body.PlayerInfo.PlayerName)); }
public void OnPlayerStartMeeting(IPlayerStartMeetingEvent evt) { Interlocked.Increment(ref OnPlayerStartMeetingCount); }
public void OnPlayerStartMeetingEvent(IPlayerStartMeetingEvent e) { _logger.LogInformation("Player {player} > started meeting, reason: {reason}", e.PlayerControl.PlayerInfo.PlayerName, e.Body == null ? "Emergency call button" : "Found the body of the player " + e.Body.PlayerInfo.PlayerName); }
public void OnPlayerStartMeeting(IPlayerStartMeetingEvent evt) => PlayerStartMeeting?.Invoke(evt);