Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ServerJoinRequestsManager.cs
Go to the documentation of this file.
3
5
7{
9
11
13
15
21
22 public void Update()
23 {
24 for (int num = _requests.Count - 1; num >= 0; num--)
25 {
26 if (!_requests[num].IsValid())
27 {
29 }
30 }
31 }
32
34 {
35 for (int num = _requests.Count - 1; num >= 0; num--)
36 {
37 if (_requests[num].Equals(request))
38 {
40 }
41 }
43 request.OnAccepted += delegate
44 {
46 };
47 request.OnRejected += delegate
48 {
50 };
51 if (this.OnRequestAdded != null)
52 {
53 this.OnRequestAdded(request);
54 }
55 }
56
57 private void RemoveRequestAtIndex(int i)
58 {
60 _requests.RemoveAt(i);
61 if (this.OnRequestRemoved != null)
62 {
63 this.OnRequestRemoved(request);
64 }
65 }
66
68 {
69 if (_requests.Remove(request) && this.OnRequestRemoved != null)
70 {
71 this.OnRequestRemoved(request);
72 }
73 }
74}
bool ICollection< KeyValuePair< TKey, TValue > >. Remove(KeyValuePair< TKey, TValue > keyValuePair)
void Add(TKey key, TValue value)
void RemoveRequest(UserJoinToServerRequest request)
readonly ReadOnlyCollection< UserJoinToServerRequest > CurrentRequests
readonly List< UserJoinToServerRequest > _requests
delegate void ServerJoinRequestEvent(UserJoinToServerRequest request)