- Timestamp:
- Sep 4, 2018, 1:00:48 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/AllocsCommands/PrivateMessageConnections.cs
r324 r325 1 using System;2 1 using System.Collections.Generic; 3 2 using Steamworks; 4 3 5 namespace AllocsFixes.CustomCommands 6 { 7 public class PrivateMessageConnections 8 { 9 private static Dictionary<CSteamID, CSteamID> senderOfLastPM = new Dictionary<CSteamID, CSteamID> (); 4 namespace AllocsFixes.CustomCommands { 5 public class PrivateMessageConnections { 6 private static readonly Dictionary<CSteamID, CSteamID> senderOfLastPM = new Dictionary<CSteamID, CSteamID> (); 10 7 11 public static void SetLastPMSender (ClientInfo _sender, ClientInfo _receiver) 12 { 8 public static void SetLastPMSender (ClientInfo _sender, ClientInfo _receiver) { 13 9 senderOfLastPM [_receiver.steamId] = _sender.steamId; 14 10 } 15 11 16 public static ClientInfo GetLastPMSenderForPlayer (ClientInfo _player) 17 { 12 public static ClientInfo GetLastPMSenderForPlayer (ClientInfo _player) { 18 13 if (senderOfLastPM.ContainsKey (_player.steamId)) { 19 14 CSteamID recSteamId = senderOfLastPM [_player.steamId]; … … 21 16 return recInfo; 22 17 } 18 23 19 return null; 24 20 }
Note:
See TracChangeset
for help on using the changeset viewer.