Elin Modding Docs Doc
Loading...
Searching...
No Matches
MeetingManager.cs
1using System;
2using System.Collections.Generic;
3using Newtonsoft.Json;
4
5// Token: 0x0200006E RID: 110
6public class MeetingManager : EClass
7{
8 // Token: 0x06000332 RID: 818 RVA: 0x00018944 File Offset: 0x00016B44
9 public void SetOwner(FactionBranch _branch)
10 {
11 this.branch = _branch;
12 foreach (Meeting meeting in this.list)
13 {
14 meeting.SetOwner(this.branch);
15 }
16 }
17
18 // Token: 0x06000333 RID: 819 RVA: 0x000189A4 File Offset: 0x00016BA4
19 public void OnSimulateHour(VirtualDate date)
20 {
21 if (this.list.Count > 0)
22 {
23 for (int i = this.list.Count - 1; i >= 0; i--)
24 {
25 if (this.list[i].dateExipire != 0 && date.IsExpired(this.list[i].dateExipire))
26 {
27 this.list.RemoveAt(i);
28 }
29 }
30 }
31 int count = this.list.Count;
32 }
33
34 // Token: 0x06000334 RID: 820 RVA: 0x00018A1C File Offset: 0x00016C1C
35 public void Add(VirtualDate date)
36 {
37 MeetingMerchant meetingMerchant = new MeetingMerchant();
38 meetingMerchant.dateExipire = date.GetRaw(0) + 10080;
39 this.list.Add(meetingMerchant);
40 if (date.IsRealTime)
41 {
42 Msg.Say("newMeeting");
43 }
44 }
45
46 // Token: 0x06000335 RID: 821 RVA: 0x00018A61 File Offset: 0x00016C61
47 public void Add(Meeting m)
48 {
49 this.list.Add(m);
50 }
51
52 // Token: 0x06000336 RID: 822 RVA: 0x00018A6F File Offset: 0x00016C6F
53 public void Remove(Meeting m)
54 {
55 this.list.Remove(m);
56 }
57
58 // Token: 0x17000098 RID: 152
59 // (get) Token: 0x06000337 RID: 823 RVA: 0x00018A7E File Offset: 0x00016C7E
60 public bool CanStartMeeting
61 {
62 get
63 {
64 return this.list.Count > 0 && this.SetRoom() != null;
65 }
66 }
67
68 // Token: 0x06000338 RID: 824 RVA: 0x00018A9C File Offset: 0x00016C9C
69 public BaseArea SetRoom()
70 {
71 Thing thing = EClass._map.props.installed.Find<TraitSpotMeeting>();
72 TraitSpotMeeting traitSpotMeeting = ((thing != null) ? thing.trait : null) as TraitSpotMeeting;
73 if (traitSpotMeeting != null)
74 {
75 this.room = traitSpotMeeting.owner.Cell.room;
76 if (this.room == null)
77 {
78 this.room = new VirtualRoom(traitSpotMeeting.owner);
79 }
80 }
81 else
82 {
83 this.room = EClass._map.rooms.listRoom.RandomItem<Room>();
84 }
85 return this.room;
86 }
87
88 // Token: 0x06000339 RID: 825 RVA: 0x00018B24 File Offset: 0x00016D24
89 public void Start()
90 {
91 this.SetRoom();
92 Thing emptySeat = this.room.GetEmptySeat();
93 EClass.pc.MoveImmediate(((emptySeat != null) ? emptySeat.pos : null) ?? this.room.GetRandomPoint(true, false), true, true);
94 this.CallNext();
95 }
96
97 // Token: 0x0600033A RID: 826 RVA: 0x00018B74 File Offset: 0x00016D74
98 public void CallNext()
99 {
100 if (this.list.Count == 0)
101 {
102 return;
103 }
104 Thing emptySeat = this.room.GetEmptySeat();
105 Point chara = ((emptySeat != null) ? emptySeat.pos : null) ?? this.room.GetRandomPoint(true, false);
106 Meeting meeting = this.list[0];
107 this.list.RemoveAt(0);
108 meeting.SetChara(chara);
109 Chara maid = EClass.Branch.GetMaid();
110 if (maid != null)
111 {
112 GameLang.refDrama1 = meeting.chara.Name;
113 LayerDrama.Activate("_chara", null, "meeting", maid, null, "").SetOnKill(new Action(meeting.Start));
114 return;
115 }
116 meeting.Start();
117 }
118
119 // Token: 0x04000566 RID: 1382
120 [JsonProperty]
121 public List<Meeting> list = new List<Meeting>();
122
123 // Token: 0x04000567 RID: 1383
124 public FactionBranch branch;
125
126 // Token: 0x04000568 RID: 1384
127 public BaseArea room;
128}
Definition Chara.cs:12
Definition Msg.cs:7
Definition Point.cs:11
Definition Room.cs:6
Definition Thing.cs:10