source: binary-improvements/AllocsCommands/PrivateMessageConnections.cs@ 313

Last change on this file since 313 was 309, checked in by alloc, 7 years ago

Fixes 14_16_21

File size: 732 bytes
RevLine 
[251]1using System;
2using System.Collections.Generic;
[309]3using Steamworks;
[251]4
5namespace AllocsFixes.CustomCommands
6{
7 public class PrivateMessageConnections
8 {
[309]9 private static Dictionary<CSteamID, CSteamID> senderOfLastPM = new Dictionary<CSteamID, CSteamID> ();
[251]10
11 public static void SetLastPMSender (ClientInfo _sender, ClientInfo _receiver)
12 {
[309]13 senderOfLastPM [_receiver.steamId] = _sender.steamId;
[251]14 }
15
16 public static ClientInfo GetLastPMSenderForPlayer (ClientInfo _player)
17 {
[309]18 if (senderOfLastPM.ContainsKey (_player.steamId)) {
19 CSteamID recSteamId = senderOfLastPM [_player.steamId];
20 ClientInfo recInfo = ConnectionManager.Instance.GetClientInfoForSteamId (recSteamId);
21 return recInfo;
22 }
[251]23 return null;
24 }
25 }
26}
Note: See TracBrowser for help on using the repository browser.