Ignore:
Timestamp:
Nov 9, 2021, 6:28:33 PM (3 years ago)
Author:
alloc
Message:

Preparations for A20 release
Changes usage of "SteamID" to "UserID" in console commands
Also changes a bunch of the WebAPI stuff to show / use UserIDs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/AllocsCommands/PrivateMessageConnections.cs

    r326 r369  
    44namespace AllocsFixes.CustomCommands {
    55        public class PrivateMessageConnections {
    6                 private static readonly Dictionary<CSteamID, CSteamID> senderOfLastPM = new Dictionary<CSteamID, CSteamID> ();
     6                private static readonly Dictionary<PlatformUserIdentifierAbs, PlatformUserIdentifierAbs> senderOfLastPM = new Dictionary<PlatformUserIdentifierAbs, PlatformUserIdentifierAbs> ();
    77
    88                public static void SetLastPMSender (ClientInfo _sender, ClientInfo _receiver) {
    9                         senderOfLastPM [_receiver.steamId] = _sender.steamId;
     9                        senderOfLastPM [_receiver.InternalId] = _sender.InternalId;
    1010                }
    1111
    1212                public static ClientInfo GetLastPMSenderForPlayer (ClientInfo _player) {
    13                         if (!senderOfLastPM.ContainsKey (_player.steamId)) {
     13                        if (!senderOfLastPM.TryGetValue (_player.InternalId, out PlatformUserIdentifierAbs recUserId)) {
    1414                                return null;
    1515                        }
    1616
    17                         CSteamID recSteamId = senderOfLastPM [_player.steamId];
    18                         ClientInfo recInfo = ConnectionManager.Instance.Clients.ForSteamId (recSteamId);
     17                        ClientInfo recInfo = ConnectionManager.Instance.Clients.ForUserId (recUserId);
    1918                        return recInfo;
    2019                }
Note: See TracChangeset for help on using the changeset viewer.