Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 |
|
---|
4 | public class PrivateMassageConnections
|
---|
5 | {
|
---|
6 | private static Dictionary<ClientInfo, ClientInfo> senderOfLastPM = new Dictionary<ClientInfo, ClientInfo>();
|
---|
7 |
|
---|
8 | public static void SetLastPMSender(ClientInfo _sender, ClientInfo _receiver) {
|
---|
9 | if (senderOfLastPM.ContainsKey(_receiver))
|
---|
10 | senderOfLastPM[_receiver] = _sender;
|
---|
11 | else
|
---|
12 | senderOfLastPM.Add(_receiver, _sender);
|
---|
13 | }
|
---|
14 |
|
---|
15 | public static ClientInfo GetLastPMSenderForPlayer(ClientInfo _player) {
|
---|
16 | if (senderOfLastPM.ContainsKey(_player))
|
---|
17 | return senderOfLastPM[_player];
|
---|
18 | return null;
|
---|
19 | }
|
---|
20 | }
|
---|
21 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.