| Rev | Line | |
|---|
| [251] | 1 | using System;
|
|---|
| 2 | using System.Collections.Generic;
|
|---|
| [309] | 3 | using Steamworks;
|
|---|
| [251] | 4 |
|
|---|
| 5 | namespace 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.