Elin Modding Docs Doc
Loading...
Searching...
No Matches
DramaManager.cs
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using DG.Tweening;
5using DG.Tweening.Core;
6using DG.Tweening.Plugins.Options;
7using UnityEngine;
8using UnityEngine.UI;
9
10// Token: 0x02000114 RID: 276
11public class DramaManager : EMono
12{
13 // Token: 0x06000726 RID: 1830 RVA: 0x0002B483 File Offset: 0x00029683
14 private void Update()
15 {
16 if (this.sequence == null)
17 {
18 return;
19 }
20 this.sequence.OnUpdate();
21 }
22
23 // Token: 0x06000727 RID: 1831 RVA: 0x0002B49C File Offset: 0x0002969C
24 public DramaSequence Play(DramaSetup setup)
25 {
26 this.setup = setup;
27 this.cgCover.SetActive(false);
28 this.endroll.SetActive(false);
29 this.tg = setup.person;
30 this.SetDialog("Default");
31 this.sequence = new DramaSequence
32 {
33 setup = setup,
34 manager = this,
35 id = setup.sheet
36 };
37 this.Load();
38 this.sequence.lastStep = (this.sequence.lastlastStep = setup.step);
39 if (!setup.forceJump.IsEmpty())
40 {
41 this.sequence.Play(setup.forceJump);
42 }
43 else
44 {
45 this.sequence.Play(0);
46 }
47 return this.sequence;
48 }
49
50 // Token: 0x06000728 RID: 1832 RVA: 0x0002B55C File Offset: 0x0002975C
51 public DramaSequence Load()
52 {
53 this.sequence.Clear();
54 this.customEvents.Clear();
55 this.customTalkTopics.Clear();
56 this.moldActor = this.actorPos.CreateMold(null);
57 if (this.tg != null)
58 {
59 this.sequence.AddActor("tg", this.tg);
60 }
61 this.sequence.AddActor("pc", new Person(EMono.pc));
62 string text = CorePath.DramaData + this.setup.book + ".xlsx";
63 ExcelData excelData = DramaManager.dictCache.TryGetValue(text, null);
64 if (excelData != null && excelData.IsModified())
65 {
66 excelData = null;
67 }
68 if (excelData == null)
69 {
70 excelData = new ExcelData();
71 }
72 excelData.maxEmptyRows = 10;
73 excelData.path = text;
74 List<Dictionary<string, string>> list = excelData.BuildList(this.setup.sheet);
75 if (!Lang.isBuiltin && this.dictLocalize.Count == 0)
76 {
77 foreach (Dictionary<string, string> dictionary in new ExcelData
78 {
79 maxEmptyRows = 10,
80 path = CorePath.DramaDataLocal + this.setup.book + ".xlsx"
81 }.BuildList(this.setup.sheet))
82 {
83 string text2 = dictionary["id"];
84 if (!text2.IsEmpty() && !dictionary["text"].IsEmpty())
85 {
86 this.dictLocalize.Add(text2, dictionary["text"]);
87 }
88 }
89 }
90 DramaManager.dictCache[text] = excelData;
91 this.idDefault = this.setup.step;
92 this.lastTalk = null;
93 this.enableTone = (this.customEventsAdded = (this.idDefaultPassed = false));
94 this.countLine = 0;
95 for (int i = 0; i < list.Count; i++)
96 {
97 this.ParseLine(list[i]);
98 this.countLine++;
99 }
100 this.AddCustomEvents("Resident");
101 this.sequence.steps["end"] = 99999;
102 this.sequence.AddActor("narrator", new Person("narrator", null));
103 return this.sequence;
104 }
105
106 // Token: 0x06000729 RID: 1833 RVA: 0x0002B7CC File Offset: 0x000299CC
107 public void AddCustomEvents(string idCustom = "Resident")
108 {
109 if (this.customEventsAdded)
110 {
111 return;
112 }
113 DramaCustomSequence dramaCustomSequence = new DramaCustomSequence
114 {
115 manager = this,
116 idDefault = this.idDefault,
117 idCustom = idCustom,
118 events = this.customEvents,
119 setup = this.sequence.setup,
120 sequence = this.sequence
121 };
122 this.CustomEvent(delegate
123 {
124 this.sequence.Exit();
125 }, null, 0f, false);
126 if (this.tg != null && this.tg.hasChara)
127 {
128 DramaManager.TG = this.tg.chara;
129 dramaCustomSequence.Build(this.tg.chara);
130 }
131 if (!this.sequence.setup.textData.IsEmpty())
132 {
133 dramaCustomSequence.BuildTextData();
134 }
135 foreach (DramaEvent e in this.customEvents)
136 {
137 this.AddEvent(e);
138 }
139 this.customEventsAdded = true;
140 }
141
142 // Token: 0x0600072A RID: 1834 RVA: 0x0002B8E8 File Offset: 0x00029AE8
143 public unsafe void ParseLine(Dictionary<string, string> item)
144 {
145 DramaManager.<>c__DisplayClass37_0 CS$<>8__locals1 = new DramaManager.<>c__DisplayClass37_0();
146 CS$<>8__locals1.<>4__this = this;
147 string[] array = item.ContainsKey("action") ? item["action"].Split('/', StringSplitOptions.None) : null;
148 CS$<>8__locals1.action = ((array != null) ? array[0] : null);
149 string text = item.ContainsKey("step") ? item["step"] : null;
150 if (text == "//")
151 {
152 return;
153 }
154 if (text == this.idDefault)
155 {
156 this.idDefaultPassed = true;
157 }
158 CS$<>8__locals1.actor = (item.ContainsKey("actor") ? item["actor"] : "#1");
159 CS$<>8__locals1.p = (item.ContainsKey("param") ? item["param"].Split(',', StringSplitOptions.None) : new string[0]);
160 CS$<>8__locals1.p0 = ((CS$<>8__locals1.p.Length != 0) ? CS$<>8__locals1.p[0] : "");
161 CS$<>8__locals1.p1 = ((CS$<>8__locals1.p.Length > 1) ? CS$<>8__locals1.p[1] : "");
162 CS$<>8__locals1.p2 = ((CS$<>8__locals1.p.Length > 2) ? CS$<>8__locals1.p[2] : "");
163 float.TryParse(CS$<>8__locals1.p0, out CS$<>8__locals1.p0f);
164 float num;
165 float.TryParse(CS$<>8__locals1.p1, out num);
166 bool flag = !item["text_JP"].IsEmpty();
167 item.TryGetValue("text_JP", null);
168 CS$<>8__locals1.text = null;
169 if (flag)
170 {
171 if (!Lang.isBuiltin)
172 {
173 string key = item["id"];
174 if (this.dictLocalize.ContainsKey(key))
175 {
176 CS$<>8__locals1.text = this.dictLocalize[key];
177 }
178 else
179 {
180 CS$<>8__locals1.text = item.TryGetValue("text_EN", null);
181 }
182 }
183 else
184 {
185 CS$<>8__locals1.text = item["text_" + Lang.langCode];
186 }
187 }
188 if (flag && CS$<>8__locals1.text.StartsWith("$") && this.tg != null && this.tg.hasChara)
189 {
190 string text2 = CS$<>8__locals1.text.Split(' ', StringSplitOptions.None)[0];
191 CS$<>8__locals1.text = CS$<>8__locals1.text.Replace(text2, this.tg.chara.GetTalkText(text2.Remove(0, 1), false, true));
192 }
193 CS$<>8__locals1.jump = (item.ContainsKey("jump") ? item["jump"] : null);
194 string text3 = item.ContainsKey("if") ? item["if"] : null;
195 string @if = item.ContainsKey("if2") ? item["if2"] : null;
196 string check = item.ContainsKey("check") ? item["check"] : null;
197 bool flag2 = false;
198 if (text != null && !this.sequence.steps.ContainsKey(text) && CS$<>8__locals1.action != "choice" && CS$<>8__locals1.action != "cancel")
199 {
200 this.sequence.steps.Add(text, this.sequence.events.Count);
201 }
202 if (text3 == "*")
203 {
204 text3 = this.lastIF;
205 @if = this.lastIF2;
206 }
207 else
208 {
209 this.lastIF = text3;
210 this.lastIF2 = @if;
211 }
212 if (!this.CheckIF(text3) || !this.CheckIF(@if))
213 {
214 if (CS$<>8__locals1.action == "reload")
215 {
216 string id = "flag" + this.countLine.ToString();
217 this.sequence.AddStep(id);
218 }
219 return;
220 }
221 string text4 = CS$<>8__locals1.action;
222 uint num2 = <PrivateImplementationDetails>.ComputeStringHash(text4);
223 if (num2 <= 1960439120U)
224 {
225 if (num2 <= 767425313U)
226 {
227 if (num2 <= 310765516U)
228 {
229 if (num2 <= 142925988U)
230 {
231 if (num2 <= 85301960U)
232 {
233 if (num2 != 59586952U)
234 {
235 if (num2 != 85301960U)
236 {
237 goto IL_1EC5;
238 }
239 if (!(text4 == "glitch"))
240 {
241 goto IL_1EC5;
242 }
243 this.AddEvent(delegate()
244 {
245 DramaActor.useGlitch = true;
246 }, 0f, false);
247 goto IL_1F1E;
248 }
249 else
250 {
251 if (!(text4 == "addResource"))
252 {
253 goto IL_1EC5;
254 }
255 this.AddEvent(delegate()
256 {
257 EMono.BranchOrHomeBranch.resources.Get(CS$<>8__locals1.p0).Mod(CS$<>8__locals1.p1.ToInt(), true);
258 }, 0f, false);
259 goto IL_1F1E;
260 }
261 }
262 else if (num2 != 107912219U)
263 {
264 if (num2 != 142925988U)
265 {
266 goto IL_1EC5;
267 }
268 if (!(text4 == "fadeInOut"))
269 {
270 goto IL_1EC5;
271 }
272 this.AddEvent(delegate()
273 {
274 CS$<>8__locals1.<>4__this.imageCover.color = ((CS$<>8__locals1.p2 != null && CS$<>8__locals1.p2 == "white") ? Color.white : Color.black);
275 CS$<>8__locals1.<>4__this.cgCover.SetActive(true);
276 CS$<>8__locals1.<>4__this.cgCover.alpha = 0f;
277 CS$<>8__locals1.<>4__this.cgCover.DOFade(1f, CS$<>8__locals1.p0f).SetDelay(0.1f);
278 }, CS$<>8__locals1.p0f, true);
279 this.AddEvent(new DramaEventWait((num == 0f) ? 0.1f : num, null));
280 this.AddEvent(delegate()
281 {
282 CS$<>8__locals1.<>4__this.imageCover.color = ((CS$<>8__locals1.p2 != null && CS$<>8__locals1.p2 == "white") ? Color.white : Color.black);
283 CS$<>8__locals1.<>4__this.cgCover.SetActive(true);
284 CS$<>8__locals1.<>4__this.cgCover.alpha = 1f;
285 CS$<>8__locals1.<>4__this.cgCover.DOFade(0f, CS$<>8__locals1.p0f).SetDelay(0.1f);
286 }, CS$<>8__locals1.p0f, false);
287 goto IL_1F1E;
288 }
289 else
290 {
291 if (!(text4 == "cancel"))
292 {
293 goto IL_1EC5;
294 }
295 this.lastTalk.canCancel = true;
296 this.lastTalk.idCancelJump = CS$<>8__locals1.jump;
297 goto IL_1F1E;
298 }
299 }
300 else if (num2 <= 260921166U)
301 {
302 if (num2 != 235771284U)
303 {
304 if (num2 != 260921166U)
305 {
306 goto IL_1EC5;
307 }
308 if (!(text4 == "bout_win"))
309 {
310 goto IL_1EC5;
311 }
312 }
313 else
314 {
315 if (!(text4 == "sound"))
316 {
317 goto IL_1EC5;
318 }
319 this.AddEvent(delegate()
320 {
321 if (CS$<>8__locals1.p1 != "")
322 {
323 SoundManager.current.MuteBGMFor(float.Parse(CS$<>8__locals1.p1));
324 }
325 EMono.Sound.Play(CS$<>8__locals1.p0);
326 }, 0f, false);
327 goto IL_1F1E;
328 }
329 }
330 else if (num2 != 290138826U)
331 {
332 if (num2 != 307805908U)
333 {
334 if (num2 != 310765516U)
335 {
336 goto IL_1EC5;
337 }
338 if (!(text4 == "haltPlaylist"))
339 {
340 goto IL_1EC5;
341 }
342 LayerDrama.haltPlaylist = true;
343 goto IL_1F1E;
344 }
345 else
346 {
347 if (!(text4 == "addKeyItem"))
348 {
349 goto IL_1EC5;
350 }
351 this.AddEvent(delegate()
352 {
353 EMono.player.ModKeyItem(CS$<>8__locals1.p0, 1, true);
354 }, 0f, false);
355 goto IL_1F1E;
356 }
357 }
358 else
359 {
360 if (!(text4 == "setBG2"))
361 {
362 goto IL_1EC5;
363 }
364 this.AddEvent(delegate()
365 {
366 Util.Instantiate<Transform>("Media/Graphics/Image/Drama/" + CS$<>8__locals1.p0, CS$<>8__locals1.<>4__this.layer).SetAsFirstSibling();
367 }, 0f, false);
368 goto IL_1F1E;
369 }
370 }
371 else if (num2 <= 588029017U)
372 {
373 if (num2 <= 381584877U)
374 {
375 if (num2 != 337658899U)
376 {
377 if (num2 != 381584877U)
378 {
379 goto IL_1EC5;
380 }
381 if (!(text4 == "addActor"))
382 {
383 goto IL_1EC5;
384 }
385 if (CS$<>8__locals1.actor == "god")
386 {
387 this.sequence.AddActor(CS$<>8__locals1.actor, new Person(LayerDrama.currentReligion));
388 goto IL_1F1E;
389 }
390 DramaActor dramaActor = this.sequence.AddActor(CS$<>8__locals1.actor, new Person(CS$<>8__locals1.actor, null));
391 if (!CS$<>8__locals1.text.IsEmpty())
392 {
393 dramaActor.owner.tempName = CS$<>8__locals1.text;
394 goto IL_1F1E;
395 }
396 goto IL_1F1E;
397 }
398 else
399 {
400 if (!(text4 == "focus"))
401 {
402 goto IL_1EC5;
403 }
404 this.AddEvent(delegate()
405 {
406 Point pos = CS$<>8__locals1.<>4__this.sequence.setup.person.chara.pos.Copy();
407 EMono.scene.screenElin.focusOption = new BaseGameScreen.FocusOption
408 {
409 pos = pos
410 };
411 }, 0f, false);
412 goto IL_1F1E;
413 }
414 }
415 else if (num2 != 434279500U)
416 {
417 if (num2 != 441554552U)
418 {
419 if (num2 != 588029017U)
420 {
421 goto IL_1EC5;
422 }
423 if (!(text4 == "bout_lose"))
424 {
425 goto IL_1EC5;
426 }
427 }
428 else
429 {
430 if (!(text4 == "alphaIn"))
431 {
432 goto IL_1EC5;
433 }
434 this.AddEvent(delegate()
435 {
436 DOTween.Kill(CS$<>8__locals1.<>4__this.cg, false);
437 CS$<>8__locals1.<>4__this.cg.alpha = 0f;
438 CS$<>8__locals1.<>4__this.cg.DOFade(1f, CS$<>8__locals1.p0f).SetDelay(0.1f);
439 }, CS$<>8__locals1.p0f, false);
440 goto IL_1F1E;
441 }
442 }
443 else
444 {
445 if (!(text4 == "completeQuest"))
446 {
447 goto IL_1EC5;
448 }
449 this.AddEvent(delegate()
450 {
451 EMono.game.quests.Complete(CS$<>8__locals1.p0.IsEmpty() ? LayerDrama.currentQuest : EMono.game.quests.Get(CS$<>8__locals1.p0));
452 LayerDrama.currentQuest = null;
453 }, 0f, false);
454 goto IL_1F1E;
455 }
456 }
457 else if (num2 <= 681154065U)
458 {
459 if (num2 != 652943243U)
460 {
461 if (num2 != 681154065U)
462 {
463 goto IL_1EC5;
464 }
465 if (!(text4 == "new"))
466 {
467 goto IL_1EC5;
468 }
469 goto IL_1F1E;
470 }
471 else
472 {
473 if (!(text4 == "Playlist"))
474 {
475 goto IL_1EC5;
476 }
477 this.AddEvent(delegate()
478 {
479 LayerDrama.haltPlaylist = false;
480 EMono.Sound.StopBGM(0f, false);
481 EMono.Sound.currentBGM = null;
482 CS$<>8__locals1.<>4__this.bgmChanged = true;
483 }, 0f, false);
484 goto IL_1F1E;
485 }
486 }
487 else if (num2 != 691248415U)
488 {
489 if (num2 != 718790086U)
490 {
491 if (num2 != 767425313U)
492 {
493 goto IL_1EC5;
494 }
495 if (!(text4 == "acceptQuest"))
496 {
497 goto IL_1EC5;
498 }
499 this.AddEvent(delegate()
500 {
501 IEnumerable<Quest> globalList = EMono.game.quests.globalList;
502 Func<Quest, bool> predicate;
503 if ((predicate = CS$<>8__locals1.<>9__64) == null)
504 {
505 predicate = (CS$<>8__locals1.<>9__64 = ((Quest a) => a.source.id == CS$<>8__locals1.p0));
506 }
507 Quest quest = globalList.Where(predicate).First<Quest>();
508 EMono.game.quests.globalList.Remove(quest);
509 EMono.game.quests.Start(quest);
510 }, 0f, false);
511 goto IL_1F1E;
512 }
513 else
514 {
515 if (!(text4 == "forceBGM"))
516 {
517 goto IL_1EC5;
518 }
519 this.AddEvent(delegate()
520 {
521 SoundManager.ForceBGM();
522 }, 0f, false);
523 goto IL_1F1E;
524 }
525 }
526 else
527 {
528 if (!(text4 == "effectEmbarkIn"))
529 {
530 goto IL_1EC5;
531 }
532 this.AddEvent(delegate()
533 {
534 EMono._map.RevealAll(true);
535 Util.Instantiate("UI/Layer/LayerEmbark/EmbarkActor_crystal", null);
536 }, 0f, false);
537 goto IL_1F1E;
538 }
539 this.AddEvent(delegate()
540 {
541 Layer instance = LayerDrama.Instance;
542 Action onKill;
543 if ((onKill = CS$<>8__locals1.<>9__66) == null)
544 {
545 onKill = (CS$<>8__locals1.<>9__66 = delegate()
546 {
547 Zone zone = EMono.game.spatials.Find(EMono._zone.instance.uidZone);
548 if (CS$<>8__locals1.action == "bout_win")
549 {
550 zone.events.AddPreEnter(new ZonePreEnterBoutWin
551 {
552 target = CS$<>8__locals1.<>4__this.tg.chara
553 }, true);
554 }
555 EMono.pc.MoveZone(zone, ZoneTransition.EnterState.Auto);
556 });
557 }
558 instance.SetOnKill(onKill);
559 }, 0f, false);
560 goto IL_1F1E;
561 }
562 if (num2 <= 1487154227U)
563 {
564 if (num2 <= 912332847U)
565 {
566 if (num2 <= 826615426U)
567 {
568 if (num2 != 797646213U)
569 {
570 if (num2 == 826615426U)
571 {
572 if (text4 == "keepBGM")
573 {
574 LayerDrama.keepBGM = true;
575 goto IL_1F1E;
576 }
577 }
578 }
579 else if (text4 == "endroll")
580 {
581 this.AddEvent(new DramaEventEndRoll());
582 goto IL_1F1E;
583 }
584 }
585 else if (num2 != 895014094U)
586 {
587 if (num2 == 912332847U)
588 {
589 if (text4 == "tutorial")
590 {
591 LayerDrama.Instance.SetOnKill(delegate
592 {
593 Tutorial.Play(CS$<>8__locals1.p0);
594 });
595 goto IL_1F1E;
596 }
597 }
598 }
599 else if (text4 == "unfocus")
600 {
601 this.AddEvent(delegate()
602 {
603 EMono.scene.screenElin.focusOption = null;
604 }, 0f, false);
605 goto IL_1F1E;
606 }
607 }
608 else if (num2 <= 1073903299U)
609 {
610 if (num2 != 998101119U)
611 {
612 if (num2 == 1073903299U)
613 {
614 if (text4 == "updateJournal")
615 {
616 this.AddEvent(delegate()
617 {
618 EMono.game.quests.UpdateJournal();
619 }, 0f, false);
620 goto IL_1F1E;
621 }
622 }
623 }
624 else if (text4 == "nextPhase")
625 {
626 this.AddEvent(delegate()
627 {
628 EMono.game.quests.Get(CS$<>8__locals1.p0).NextPhase();
629 }, 0f, false);
630 goto IL_1F1E;
631 }
632 }
633 else if (num2 != 1225822769U)
634 {
635 if (num2 != 1425576060U)
636 {
637 if (num2 == 1487154227U)
638 {
639 if (text4 == "slap")
640 {
641 this.AddEvent(delegate()
642 {
643 Layer instance = LayerDrama.Instance;
644 Action onKill;
645 if ((onKill = CS$<>8__locals1.<>9__65) == null)
646 {
647 onKill = (CS$<>8__locals1.<>9__65 = delegate()
648 {
649 CS$<>8__locals1.<>4__this.tg.chara.PlaySound("whip", 1f, true);
650 CS$<>8__locals1.<>4__this.tg.chara.Say("slap", CS$<>8__locals1.<>4__this.tg.chara, EMono.pc, null, null);
651 EMono.pc.PlayAnime(AnimeID.Shiver, false);
652 EMono.pc.DamageHP(5 + EClass.rndHalf(EMono.pc.MaxHP / 3), 919, 100, AttackSource.Condition, null, true);
653 EMono.pc.OnInsulted();
654 });
655 }
656 instance.SetOnKill(onKill);
657 }, 0f, false);
658 goto IL_1F1E;
659 }
660 }
661 }
662 else if (text4 == "setBG")
663 {
664 this.AddEvent(delegate()
665 {
666 if (CS$<>8__locals1.p0.IsEmpty())
667 {
668 CS$<>8__locals1.<>4__this.imageBG.enabled = false;
669 return;
670 }
671 CS$<>8__locals1.<>4__this.imageBG.enabled = true;
672 CS$<>8__locals1.<>4__this.imageBG.sprite = Resources.Load<Sprite>("Media/Graphics/Image/Drama/" + CS$<>8__locals1.p0);
673 }, 0f, false);
674 goto IL_1F1E;
675 }
676 }
677 else if (text4 == "hideDialog")
678 {
679 this.AddEvent(delegate()
680 {
681 CS$<>8__locals1.<>4__this.dialog.SetActive(false);
682 }, 0f, false);
683 goto IL_1F1E;
684 }
685 }
686 else if (num2 <= 1787721130U)
687 {
688 if (num2 <= 1563407972U)
689 {
690 if (num2 != 1505339517U)
691 {
692 if (num2 == 1563407972U)
693 {
694 if (text4 == "BGMStay")
695 {
696 this.AddEvent(delegate()
697 {
698 EMono.Sound.PlayBGM(EMono.core.refs.dictBGM[CS$<>8__locals1.p0.ToInt()], 0f, 0f);
699 }, 0f, false);
700 goto IL_1F1E;
701 }
702 }
703 }
704 else if (text4 == "alphaOut")
705 {
706 this.AddEvent(delegate()
707 {
708 DOTween.Kill(CS$<>8__locals1.<>4__this.cg, false);
709 CS$<>8__locals1.<>4__this.cg.alpha = 1f;
710 CS$<>8__locals1.<>4__this.cg.DOFade(0f, CS$<>8__locals1.p0f).SetDelay(0.1f);
711 }, CS$<>8__locals1.p0f, true);
712 goto IL_1F1E;
713 }
714 }
715 else if (num2 != 1611900348U)
716 {
717 if (num2 != 1672383624U)
718 {
719 if (num2 == 1787721130U)
720 {
721 if (text4 == "end")
722 {
723 this.AddEvent(new DramaEventExit());
724 goto IL_1F1E;
725 }
726 }
727 }
728 else if (text4 == "addAffinity")
729 {
730 goto IL_1F1E;
731 }
732 }
733 else if (text4 == "alphaInOut")
734 {
735 this.AddEvent(delegate()
736 {
737 DOTween.Kill(CS$<>8__locals1.<>4__this.cg, false);
738 CS$<>8__locals1.<>4__this.cg.alpha = 1f;
739 CS$<>8__locals1.<>4__this.cg.DOFade(0f, CS$<>8__locals1.p0f).SetDelay(0.1f);
740 }, CS$<>8__locals1.p0f, true);
741 this.AddEvent(new DramaEventWait((num == 0f) ? 0.1f : num, null));
742 this.AddEvent(delegate()
743 {
744 DOTween.Kill(CS$<>8__locals1.<>4__this.cg, false);
745 CS$<>8__locals1.<>4__this.cg.alpha = 0f;
746 CS$<>8__locals1.<>4__this.cg.DOFade(1f, CS$<>8__locals1.p0f).SetDelay(0.1f);
747 }, CS$<>8__locals1.p0f, false);
748 goto IL_1F1E;
749 }
750 }
751 else if (num2 <= 1852738900U)
752 {
753 if (num2 != 1813383965U)
754 {
755 if (num2 == 1852738900U)
756 {
757 if (text4 == "effect")
758 {
759 this.AddEvent(delegate()
760 {
761 Point from = new Point(CS$<>8__locals1.p[1].ToInt(), CS$<>8__locals1.p[2].ToInt());
762 Effect.Get(CS$<>8__locals1.p0).Play(from, 0f, null, null);
763 }, 0f, false);
764 goto IL_1F1E;
765 }
766 }
767 }
768 else if (text4 == "setHour")
769 {
770 this.AddEvent(delegate()
771 {
772 EMono.world.date.hour = (int)CS$<>8__locals1.p0f;
773 EMono.world.date.min = 0;
774 EMono.scene.OnChangeHour();
775 EMono.scene.screenElin.RefreshAll();
776 EMono.pc.RecalculateFOV();
777 }, 0f, false);
778 goto IL_1F1E;
779 }
780 }
781 else if (num2 != 1908317780U)
782 {
783 if (num2 != 1915422415U)
784 {
785 if (num2 == 1960439120U)
786 {
787 if (text4 == "haltBGM")
788 {
789 EMono.Sound.haltUpdate = true;
790 goto IL_1F1E;
791 }
792 }
793 }
794 else if (text4 == "setDialog")
795 {
796 this.AddEvent(delegate()
797 {
798 CS$<>8__locals1.<>4__this.SetDialog(CS$<>8__locals1.p0);
799 }, 0f, false);
800 goto IL_1F1E;
801 }
802 }
803 else if (text4 == "setQuestClient")
804 {
805 this.AddEvent(delegate()
806 {
807 if (LayerDrama.currentQuest != null)
808 {
809 LayerDrama.currentQuest.SetClient(CS$<>8__locals1.<>4__this.tg.chara, false);
810 }
811 }, 0f, false);
812 goto IL_1F1E;
813 }
814 }
815 else
816 {
817 if (num2 <= 3002570765U)
818 {
819 if (num2 <= 2301512864U)
820 {
821 if (num2 <= 2124469614U)
822 {
823 if (num2 <= 2066570139U)
824 {
825 if (num2 != 2027681165U)
826 {
827 if (num2 != 2066570139U)
828 {
829 goto IL_1EC5;
830 }
831 if (!(text4 == "canCancel"))
832 {
833 goto IL_1EC5;
834 }
835 this.AddEvent(delegate()
836 {
837 CS$<>8__locals1.<>4__this.sequence.canCancel = bool.Parse(CS$<>8__locals1.p0);
838 }, 0f, false);
839 goto IL_1F1E;
840 }
841 else
842 {
843 if (!(text4 == "setFlag"))
844 {
845 goto IL_1EC5;
846 }
847 this.AddEvent(delegate()
848 {
849 if (CS$<>8__locals1.p0.StartsWith("*"))
850 {
851 Quest quest = EMono.game.quests.Get(CS$<>8__locals1.p0.TrimStart('*'));
852 if (quest != null)
853 {
854 quest.ChangePhase(CS$<>8__locals1.p1.ToInt(quest.GetType()));
855 return;
856 }
857 }
858 else
859 {
860 EMono.player.dialogFlags[CS$<>8__locals1.p0] = (CS$<>8__locals1.p1.IsEmpty() ? 1 : int.Parse(CS$<>8__locals1.p1));
861 }
862 }, 0f, false);
863 goto IL_1F1E;
864 }
865 }
866 else if (num2 != 2076142835U)
867 {
868 if (num2 != 2124469614U)
869 {
870 goto IL_1EC5;
871 }
872 if (!(text4 == "focusChara"))
873 {
874 goto IL_1EC5;
875 }
876 this.AddEvent(delegate()
877 {
878 Point pos = EMono._map.FindChara(CS$<>8__locals1.p0).pos.Copy();
879 EMono.scene.screenElin.focusOption = new BaseGameScreen.FocusOption
880 {
881 pos = pos,
882 speed = CS$<>8__locals1.p1.IsEmpty("2").ToFloat()
883 };
884 }, 0f, false);
885 goto IL_1F1E;
886 }
887 else
888 {
889 if (!(text4 == "hideUI"))
890 {
891 goto IL_1EC5;
892 }
893 this.AddEvent(delegate()
894 {
895 EMono.ui.Hide(CS$<>8__locals1.p0f);
896 }, 0f, false);
897 goto IL_1F1E;
898 }
899 }
900 else if (num2 <= 2194345477U)
901 {
902 if (num2 != 2137771011U)
903 {
904 if (num2 != 2194345477U)
905 {
906 goto IL_1EC5;
907 }
908 if (!(text4 == "fadeOut"))
909 {
910 goto IL_1EC5;
911 }
912 this.AddEvent(delegate()
913 {
914 CS$<>8__locals1.<>4__this.imageCover.color = ((CS$<>8__locals1.p1 != null && CS$<>8__locals1.p1 == "white") ? Color.white : Color.black);
915 CS$<>8__locals1.<>4__this.cgCover.SetActive(true);
916 CS$<>8__locals1.<>4__this.cgCover.alpha = 0f;
917 CS$<>8__locals1.<>4__this.cgCover.DOFade(1f, CS$<>8__locals1.p0f).SetDelay(0.1f);
918 }, CS$<>8__locals1.p0f, true);
919 goto IL_1F1E;
920 }
921 else
922 {
923 if (!(text4 == "focusPos"))
924 {
925 goto IL_1EC5;
926 }
927 this.AddEvent(delegate()
928 {
929 EMono.scene.screenElin.focusOption = new BaseGameScreen.FocusOption
930 {
931 pos = new Point(CS$<>8__locals1.p0.ToInt(), CS$<>8__locals1.p1.ToInt()),
932 speed = CS$<>8__locals1.p2.IsEmpty("2").ToFloat()
933 };
934 }, 0f, false);
935 goto IL_1F1E;
936 }
937 }
938 else if (num2 != 2212514718U)
939 {
940 if (num2 != 2225796703U)
941 {
942 if (num2 != 2301512864U)
943 {
944 goto IL_1EC5;
945 }
946 if (!(text4 == "wait"))
947 {
948 goto IL_1EC5;
949 }
950 this.AddEvent(new DramaEventWait(CS$<>8__locals1.p0f, null));
951 goto IL_1F1E;
952 }
953 else
954 {
955 if (!(text4 == "startQuest"))
956 {
957 goto IL_1EC5;
958 }
959 this.AddEvent(delegate()
960 {
961 Quest quest = Quest.Create(CS$<>8__locals1.p0, null, null);
962 if (!quest.HasDLC)
963 {
964 Msg.Say("(Failed DLC check)");
965 return;
966 }
967 EMono.game.quests.Start(quest);
968 LayerDrama.currentQuest = quest;
969 if (CS$<>8__locals1.<>4__this.tg != null && CS$<>8__locals1.<>4__this.tg.chara != null)
970 {
971 string[] array2 = new string[6];
972 array2[0] = "Starting Quest:";
973 int num3 = 1;
974 Quest quest2 = quest;
975 array2[num3] = ((quest2 != null) ? quest2.ToString() : null);
976 array2[2] = "/";
977 int num4 = 3;
978 Quest quest3 = CS$<>8__locals1.<>4__this.tg.chara.quest;
979 array2[num4] = ((quest3 != null) ? quest3.ToString() : null);
980 array2[4] = "/";
981 array2[5] = (quest == CS$<>8__locals1.<>4__this.tg.chara.quest).ToString();
982 Debug.Log(string.Concat(array2));
983 }
984 }, 0f, false);
985 goto IL_1F1E;
986 }
987 }
988 else
989 {
990 if (!(text4 == "propEnter"))
991 {
992 goto IL_1EC5;
993 }
994 this.AddEvent(delegate()
995 {
996 DramaProp component = Util.Instantiate("Media/Drama/Prop/" + CS$<>8__locals1.p0, null).GetComponent<DramaProp>();
997 component.name = CS$<>8__locals1.p0;
998 if (CS$<>8__locals1.p1.IsEmpty())
999 {
1000 component.transform.position = EMono.scene.cam.transform.position;
1001 }
1002 else
1003 {
1004 Point point = new Point(CS$<>8__locals1.p[1].ToInt(), CS$<>8__locals1.p[2].ToInt());
1005 component.transform.position = *point.PositionCenter();
1006 }
1007 component.Enter();
1008 }, 0f, false);
1009 goto IL_1F1E;
1010 }
1011 }
1012 else if (num2 <= 2704835779U)
1013 {
1014 if (num2 <= 2382385783U)
1015 {
1016 if (num2 != 2350759358U)
1017 {
1018 if (num2 != 2382385783U)
1019 {
1020 goto IL_1EC5;
1021 }
1022 if (!(text4 == "checkAffinity"))
1023 {
1024 goto IL_1EC5;
1025 }
1026 goto IL_1F1E;
1027 }
1028 else
1029 {
1030 if (!(text4 == "%worship"))
1031 {
1032 goto IL_1EC5;
1033 }
1034 this.AddEvent(delegate()
1035 {
1036 LayerDrama.currentReligion.JoinFaith(EMono.pc);
1037 Tutorial.Reserve("faith", null);
1038 }, 0f, false);
1039 goto IL_1F1E;
1040 }
1041 }
1042 else if (num2 != 2406701654U)
1043 {
1044 if (num2 != 2470639475U)
1045 {
1046 if (num2 != 2704835779U)
1047 {
1048 goto IL_1EC5;
1049 }
1050 if (!(text4 == "replace"))
1051 {
1052 goto IL_1EC5;
1053 }
1054 this.AddEvent(delegate()
1055 {
1056 CS$<>8__locals1.<>4__this.textReplace = CS$<>8__locals1.text;
1057 }, 0f, false);
1058 goto IL_1F1E;
1059 }
1060 else
1061 {
1062 if (!(text4 == "showSkip"))
1063 {
1064 goto IL_1EC5;
1065 }
1066 this.goSkip.SetActive(true);
1067 goto IL_1F1E;
1068 }
1069 }
1070 else if (!(text4 == "choice"))
1071 {
1072 goto IL_1EC5;
1073 }
1074 }
1075 else if (num2 <= 2846199180U)
1076 {
1077 if (num2 != 2745269549U)
1078 {
1079 if (num2 != 2846199180U)
1080 {
1081 goto IL_1EC5;
1082 }
1083 if (!(text4 == "drop"))
1084 {
1085 goto IL_1EC5;
1086 }
1087 this.AddEvent(delegate()
1088 {
1089 Msg.Say("dropReward");
1090 CardBlueprint.SetNormalRarity(false);
1091 Thing t = ThingGen.Create(CS$<>8__locals1.p0, -1, -1);
1092 EMono._zone.AddCard(t, EMono.pc.pos);
1093 }, 0f, false);
1094 goto IL_1F1E;
1095 }
1096 else
1097 {
1098 if (!(text4 == "lastBGM"))
1099 {
1100 goto IL_1EC5;
1101 }
1102 this.AddEvent(delegate()
1103 {
1104 EMono.Sound.StopBGM(CS$<>8__locals1.p0f, true);
1105 }, 0f, false);
1106 goto IL_1F1E;
1107 }
1108 }
1109 else if (num2 != 2888196486U)
1110 {
1111 if (num2 != 2914142528U)
1112 {
1113 if (num2 != 3002570765U)
1114 {
1115 goto IL_1EC5;
1116 }
1117 if (!(text4 == "invoke"))
1118 {
1119 goto IL_1EC5;
1120 }
1121 if (CS$<>8__locals1.jump.IsEmpty())
1122 {
1123 this.AddEvent(delegate()
1124 {
1125 typeof(DramaOutcome).GetMethod(CS$<>8__locals1.p[0]).Invoke(CS$<>8__locals1.<>4__this.outcome, null);
1126 }, 0f, false);
1127 goto IL_1F1E;
1128 }
1129 this.AddEvent(delegate()
1130 {
1131 }, delegate()
1132 {
1133 if (!(bool)typeof(DramaOutcome).GetMethod(CS$<>8__locals1.p[0]).Invoke(CS$<>8__locals1.<>4__this.outcome, null))
1134 {
1135 return "";
1136 }
1137 return CS$<>8__locals1.jump;
1138 });
1139 flag2 = true;
1140 goto IL_1F1E;
1141 }
1142 else
1143 {
1144 if (!(text4 == "fadeIn"))
1145 {
1146 goto IL_1EC5;
1147 }
1148 this.AddEvent(delegate()
1149 {
1150 CS$<>8__locals1.<>4__this.imageCover.color = ((CS$<>8__locals1.p1 != null && CS$<>8__locals1.p1 == "white") ? Color.white : Color.black);
1151 CS$<>8__locals1.<>4__this.cgCover.SetActive(true);
1152 CS$<>8__locals1.<>4__this.cgCover.alpha = 1f;
1153 CS$<>8__locals1.<>4__this.cgCover.DOFade(0f, CS$<>8__locals1.p0f).SetDelay(0.1f);
1154 }, CS$<>8__locals1.p0f, false);
1155 goto IL_1F1E;
1156 }
1157 }
1158 else
1159 {
1160 if (!(text4 == "destroyItem"))
1161 {
1162 goto IL_1EC5;
1163 }
1164 this.AddEvent(delegate()
1165 {
1166 EMono.pc.things.Find(CS$<>8__locals1.p0, -1, -1).Destroy();
1167 }, 0f, false);
1168 goto IL_1F1E;
1169 }
1170 }
1171 else if (num2 <= 3475118372U)
1172 {
1173 if (num2 <= 3244494447U)
1174 {
1175 if (num2 <= 3083595508U)
1176 {
1177 if (num2 != 3036235398U)
1178 {
1179 if (num2 != 3083595508U)
1180 {
1181 goto IL_1EC5;
1182 }
1183 if (!(text4 == "inject"))
1184 {
1185 goto IL_1EC5;
1186 }
1187 DramaEventTalk dramaEventTalk = this.lastTalk;
1188 if (this.idDefaultPassed)
1189 {
1190 this.AddCustomEvents(CS$<>8__locals1.p0);
1191 }
1192 this.lastTalk = dramaEventTalk;
1193 goto IL_1F1E;
1194 }
1195 else
1196 {
1197 if (!(text4 == "enableTone"))
1198 {
1199 goto IL_1EC5;
1200 }
1201 this.enableTone = true;
1202 goto IL_1F1E;
1203 }
1204 }
1205 else if (num2 != 3180049141U)
1206 {
1207 if (num2 != 3202888471U)
1208 {
1209 if (num2 != 3244494447U)
1210 {
1211 goto IL_1EC5;
1212 }
1213 if (!(text4 == "editPlaylist"))
1214 {
1215 goto IL_1EC5;
1216 }
1217 this.AddEvent(delegate()
1218 {
1219 List<int> list = new List<int>();
1220 foreach (string s in CS$<>8__locals1.p)
1221 {
1222 list.Add(int.Parse(s));
1223 }
1224 EMono._zone.SetBGM(list, true);
1225 }, 0f, false);
1226 goto IL_1F1E;
1227 }
1228 else
1229 {
1230 if (!(text4 == "propLeave"))
1231 {
1232 goto IL_1EC5;
1233 }
1234 this.AddEvent(delegate()
1235 {
1236 GameObject.Find(CS$<>8__locals1.p0).GetComponent<DramaProp>().Leave();
1237 }, 0f, false);
1238 goto IL_1F1E;
1239 }
1240 }
1241 else
1242 {
1243 if (!(text4 == "shake"))
1244 {
1245 goto IL_1EC5;
1246 }
1247 this.AddEvent(delegate()
1248 {
1249 Shaker.ShakeCam("default", 1f);
1250 }, 0f, false);
1251 goto IL_1F1E;
1252 }
1253 }
1254 else if (num2 <= 3294324549U)
1255 {
1256 if (num2 != 3264522692U)
1257 {
1258 if (num2 != 3294324549U)
1259 {
1260 goto IL_1EC5;
1261 }
1262 if (!(text4 == "destroy"))
1263 {
1264 goto IL_1EC5;
1265 }
1266 this.AddEvent(delegate()
1267 {
1268 Chara chara = EMono._map.FindChara(CS$<>8__locals1.p0);
1269 if (chara != null)
1270 {
1271 chara.Destroy();
1272 return;
1273 }
1274 Debug.Log("Drama.destroy chara not found:" + CS$<>8__locals1.p0);
1275 }, 0f, false);
1276 goto IL_1F1E;
1277 }
1278 else
1279 {
1280 if (!(text4 == "topic"))
1281 {
1282 goto IL_1EC5;
1283 }
1284 this.customTalkTopics[CS$<>8__locals1.p0] = CS$<>8__locals1.text;
1285 goto IL_1F1E;
1286 }
1287 }
1288 else if (num2 != 3439296072U)
1289 {
1290 if (num2 != 3465848593U)
1291 {
1292 if (num2 != 3475118372U)
1293 {
1294 goto IL_1EC5;
1295 }
1296 if (!(text4 == "effectEmbarkOut"))
1297 {
1298 goto IL_1EC5;
1299 }
1300 this.AddEvent(delegate()
1301 {
1302 UnityEngine.Object.FindObjectOfType<EmbarkActor>().Hide();
1303 }, 0f, false);
1304 goto IL_1F1E;
1305 }
1306 else
1307 {
1308 if (!(text4 == "stopBGM"))
1309 {
1310 goto IL_1EC5;
1311 }
1312 this.AddEvent(delegate()
1313 {
1314 LayerDrama.haltPlaylist = true;
1315 EMono.Sound.StopBGM(CS$<>8__locals1.p0f, false);
1316 EMono.Sound.currentBGM = null;
1317 }, 0f, false);
1318 goto IL_1F1E;
1319 }
1320 }
1321 else
1322 {
1323 if (!(text4 == "save"))
1324 {
1325 goto IL_1EC5;
1326 }
1327 this.AddEvent(delegate()
1328 {
1329 EMono.game.Save(false, null, true);
1330 }, 0f, false);
1331 goto IL_1F1E;
1332 }
1333 }
1334 else if (num2 <= 3798489521U)
1335 {
1336 if (num2 <= 3666392194U)
1337 {
1338 if (num2 != 3591781101U)
1339 {
1340 if (num2 != 3666392194U)
1341 {
1342 goto IL_1EC5;
1343 }
1344 if (!(text4 == "saveBGM"))
1345 {
1346 goto IL_1EC5;
1347 }
1348 goto IL_1F1E;
1349 }
1350 else
1351 {
1352 if (!(text4 == "disableFullPortrait"))
1353 {
1354 goto IL_1EC5;
1355 }
1356 this.AddEvent(delegate()
1357 {
1358 CS$<>8__locals1.<>4__this.sequence.fullPortrait = false;
1359 }, 0f, false);
1360 goto IL_1F1E;
1361 }
1362 }
1363 else if (num2 != 3712584270U)
1364 {
1365 if (num2 != 3742116480U)
1366 {
1367 if (num2 != 3798489521U)
1368 {
1369 goto IL_1EC5;
1370 }
1371 if (!(text4 == "BGM"))
1372 {
1373 goto IL_1EC5;
1374 }
1375 this.AddEvent(delegate()
1376 {
1377 LayerDrama.haltPlaylist = true;
1378 LayerDrama.maxBGMVolume = true;
1379 EMono.Sound.PlayBGM(EMono.core.refs.dictBGM[CS$<>8__locals1.p0.ToInt()], 0f, 0f);
1380 CS$<>8__locals1.<>4__this.bgmChanged = true;
1381 }, 0f, false);
1382 goto IL_1F1E;
1383 }
1384 else
1385 {
1386 if (!(text4 == "fadeEnd"))
1387 {
1388 goto IL_1EC5;
1389 }
1390 if (CS$<>8__locals1.p0f == 0f)
1391 {
1392 CS$<>8__locals1.p0f = 1f;
1393 }
1394 this.AddEvent(delegate()
1395 {
1396 CS$<>8__locals1.<>4__this.imageCover.color = Color.black;
1397 CS$<>8__locals1.<>4__this.cgCover.SetActive(true);
1398 CS$<>8__locals1.<>4__this.cgCover.alpha = 0f;
1399 CS$<>8__locals1.<>4__this.cgCover.DOFade(1f, CS$<>8__locals1.p0f).SetDelay(0.1f);
1400 }, CS$<>8__locals1.p0f, true);
1401 this.AddEvent(delegate()
1402 {
1403 CS$<>8__locals1.<>4__this.dialog.SetActive(false);
1404 CS$<>8__locals1.<>4__this.imageBG.enabled = false;
1405 }, 0f, false);
1406 this.AddEvent(delegate()
1407 {
1408 DOTween.Kill(CS$<>8__locals1.<>4__this.cg, false);
1409 CS$<>8__locals1.<>4__this.cg.alpha = 1f;
1410 CS$<>8__locals1.<>4__this.cg.DOFade(0f, CS$<>8__locals1.p0f).SetDelay(0.1f);
1411 }, CS$<>8__locals1.p0f, true);
1412 goto IL_1F1E;
1413 }
1414 }
1415 else
1416 {
1417 if (!(text4 == "focusPC"))
1418 {
1419 goto IL_1EC5;
1420 }
1421 this.AddEvent(delegate()
1422 {
1423 EMono.scene.screenElin.focusOption = new BaseGameScreen.FocusOption
1424 {
1425 player = true,
1426 speed = CS$<>8__locals1.p0.IsEmpty("2").ToFloat()
1427 };
1428 }, 0f, false);
1429 goto IL_1F1E;
1430 }
1431 }
1432 else if (num2 <= 3984383372U)
1433 {
1434 if (num2 != 3901313050U)
1435 {
1436 if (num2 != 3984383372U)
1437 {
1438 goto IL_1EC5;
1439 }
1440 if (!(text4 == "reload"))
1441 {
1442 goto IL_1EC5;
1443 }
1444 string __step = "flag" + this.countLine.ToString();
1445 this.AddEvent(delegate()
1446 {
1447 CS$<>8__locals1.<>4__this.Load();
1448 CS$<>8__locals1.<>4__this.sequence.Play(CS$<>8__locals1.jump.IsEmpty(__step));
1449 }, 0.01f, true);
1450 this.sequence.AddStep(__step);
1451 goto IL_1F1E;
1452 }
1453 else
1454 {
1455 if (!(text4 == "_choices"))
1456 {
1457 goto IL_1EC5;
1458 }
1459 using (List<DramaChoice>.Enumerator enumerator = this._choices.GetEnumerator())
1460 {
1461 while (enumerator.MoveNext())
1462 {
1463 DramaChoice choice = enumerator.Current;
1464 this.lastTalk.AddChoice(choice);
1465 }
1466 goto IL_1F1E;
1467 }
1468 }
1469 }
1470 else if (num2 != 4018229058U)
1471 {
1472 if (num2 != 4097442686U)
1473 {
1474 if (num2 != 4121006852U)
1475 {
1476 goto IL_1EC5;
1477 }
1478 if (!(text4 == "setAlwaysVisible"))
1479 {
1480 goto IL_1EC5;
1481 }
1482 this.AddEvent(delegate()
1483 {
1484 LayerDrama.alwaysVisible = EMono._map.FindChara(CS$<>8__locals1.p0);
1485 }, 0f, false);
1486 goto IL_1F1E;
1487 }
1488 else
1489 {
1490 if (!(text4 == "screenLock"))
1491 {
1492 goto IL_1EC5;
1493 }
1494 this.layer.ShowScreenLock(CS$<>8__locals1.p0);
1495 goto IL_1F1E;
1496 }
1497 }
1498 else
1499 {
1500 if (!(text4 == "canSkip"))
1501 {
1502 goto IL_1EC5;
1503 }
1504 this.AddEvent(delegate()
1505 {
1506 CS$<>8__locals1.<>4__this.sequence.skipJump = CS$<>8__locals1.p0;
1507 }, 0f, false);
1508 goto IL_1F1E;
1509 }
1510 if (this.CheckIF(text3) && this.CheckIF(@if))
1511 {
1512 if (array.Length > 1)
1513 {
1514 text4 = array[1];
1515 num2 = <PrivateImplementationDetails>.ComputeStringHash(text4);
1516 if (num2 <= 1362521689U)
1517 {
1518 if (num2 <= 232707651U)
1519 {
1520 if (num2 != 164679485U)
1521 {
1522 if (num2 == 232707651U)
1523 {
1524 if (text4 == "depart")
1525 {
1526 CS$<>8__locals1.text = "depart".lang();
1527 CS$<>8__locals1.jump = "_depart";
1528 }
1529 }
1530 }
1531 else if (text4 == "quest")
1532 {
1533 CS$<>8__locals1.text = "deQuest".lang();
1534 CS$<>8__locals1.jump = "_quest";
1535 }
1536 }
1537 else if (num2 != 415325326U)
1538 {
1539 if (num2 == 1362521689U)
1540 {
1541 if (text4 == "trade")
1542 {
1543 CS$<>8__locals1.text = "daTrade".lang();
1544 CS$<>8__locals1.jump = "_trade";
1545 }
1546 }
1547 }
1548 else if (text4 == "rumor")
1549 {
1550 CS$<>8__locals1.text = "letsTalk".lang();
1551 CS$<>8__locals1.jump = "_rumor";
1552 }
1553 }
1554 else if (num2 <= 1708488555U)
1555 {
1556 if (num2 != 1583061253U)
1557 {
1558 if (num2 == 1708488555U)
1559 {
1560 if (text4 == "buy")
1561 {
1562 CS$<>8__locals1.text = "daBuy".lang();
1563 CS$<>8__locals1.jump = "_buy";
1564 }
1565 }
1566 }
1567 else if (text4 == "sell")
1568 {
1569 CS$<>8__locals1.text = "daSell".lang();
1570 CS$<>8__locals1.jump = "_sell";
1571 }
1572 }
1573 else if (num2 != 1911791459U)
1574 {
1575 if (num2 == 2571906332U)
1576 {
1577 if (text4 == "give")
1578 {
1579 CS$<>8__locals1.text = "daGive".lang();
1580 CS$<>8__locals1.jump = "_give";
1581 }
1582 }
1583 }
1584 else if (text4 == "bye")
1585 {
1586 CS$<>8__locals1.text = "bye".lang();
1587 CS$<>8__locals1.jump = "_bye";
1588 }
1589 }
1590 flag2 = true;
1591 this.lastTalk.AddChoice(new DramaChoice(CS$<>8__locals1.text, CS$<>8__locals1.jump, CS$<>8__locals1.p0, check, text3));
1592 goto IL_1F1E;
1593 }
1594 goto IL_1F1E;
1595 }
1596 IL_1EC5:
1597 if (flag)
1598 {
1599 this.lastTalk = (this.AddEvent(new DramaEventTalk(CS$<>8__locals1.actor, delegate()
1600 {
1601 if (!CS$<>8__locals1.<>4__this.textReplace.IsEmpty())
1602 {
1603 CS$<>8__locals1.text = CS$<>8__locals1.<>4__this.textReplace;
1604 CS$<>8__locals1.<>4__this.textReplace = null;
1605 }
1606 if (CS$<>8__locals1.<>4__this.tg != null && (CS$<>8__locals1.actor == "tg" || CS$<>8__locals1.actor.IsEmpty()))
1607 {
1608 CS$<>8__locals1.text = CS$<>8__locals1.<>4__this.tg.ApplyTone(CS$<>8__locals1.text);
1609 }
1610 return CS$<>8__locals1.text;
1611 })) as DramaEventTalk);
1612 this.lastTalk.center = (CS$<>8__locals1.p0 == "center");
1613 }
1614 IL_1F1E:
1615 if (!string.IsNullOrEmpty(CS$<>8__locals1.jump) && !flag2)
1616 {
1617 this.AddEvent(new DramaEventGoto(CS$<>8__locals1.jump));
1618 }
1619 }
1620
1621 // Token: 0x0600072B RID: 1835 RVA: 0x0002D848 File Offset: 0x0002BA48
1622 public DramaActor GetActor(string id)
1623 {
1624 return this.sequence.GetActor(id);
1625 }
1626
1627 // Token: 0x170001BD RID: 445
1628 // (get) Token: 0x0600072C RID: 1836 RVA: 0x0002D856 File Offset: 0x0002BA56
1629 public DramaActor tgActor
1630 {
1631 get
1632 {
1633 return this.sequence.GetActor("tg");
1634 }
1635 }
1636
1637 // Token: 0x0600072D RID: 1837 RVA: 0x0002D868 File Offset: 0x0002BA68
1638 public DramaEvent AddEvent(DramaEvent e)
1639 {
1640 return this.sequence.AddEvent(e);
1641 }
1642
1643 // Token: 0x0600072E RID: 1838 RVA: 0x0002D876 File Offset: 0x0002BA76
1644 public DramaEventMethod AddEvent(Action func, float duration = 0f, bool halt = false)
1645 {
1646 return this.AddEvent(new DramaEventMethod(func, duration, halt)) as DramaEventMethod;
1647 }
1648
1649 // Token: 0x0600072F RID: 1839 RVA: 0x0002D88B File Offset: 0x0002BA8B
1650 public DramaEventMethod AddEvent(Action func, Func<string> funcJump)
1651 {
1652 return this.AddEvent(new DramaEventMethod(func, 0f, false)
1653 {
1654 jumpFunc = funcJump
1655 }) as DramaEventMethod;
1656 }
1657
1658 // Token: 0x06000730 RID: 1840 RVA: 0x0002D8AC File Offset: 0x0002BAAC
1659 public DramaEvent CustomEvent(Action func, string step = null, float duration = 0f, bool halt = false)
1660 {
1661 DramaEventMethod dramaEventMethod = new DramaEventMethod(func, duration, halt)
1662 {
1663 step = step
1664 };
1665 this.customEvents.Add(dramaEventMethod);
1666 return dramaEventMethod;
1667 }
1668
1669 // Token: 0x06000731 RID: 1841 RVA: 0x0002D8D8 File Offset: 0x0002BAD8
1670 public void SetDialog(string id = "Default")
1671 {
1672 foreach (DialogDrama dialogDrama in base.GetComponentsInChildren<DialogDrama>(true))
1673 {
1674 if (dialogDrama.portrait)
1675 {
1676 dialogDrama.portrait.imageFull.SetActive(false);
1677 }
1678 dialogDrama.SetActive(false);
1679 if (dialogDrama.name == "Dialog" + id)
1680 {
1681 this.dialog = dialogDrama;
1682 }
1683 }
1684 }
1685
1686 // Token: 0x06000732 RID: 1842 RVA: 0x0002D944 File Offset: 0x0002BB44
1687 public bool CheckIF(string IF)
1688 {
1689 if (IF == null || IF.IsEmpty())
1690 {
1691 return true;
1692 }
1693 string[] array = IF.Split(',', StringSplitOptions.None);
1694 string text = array[0];
1695 uint num = <PrivateImplementationDetails>.ComputeStringHash(text);
1696 if (num <= 2044268227U)
1697 {
1698 if (num <= 439160533U)
1699 {
1700 if (num <= 154126619U)
1701 {
1702 if (num != 98859158U)
1703 {
1704 if (num == 154126619U)
1705 {
1706 if (text == "letterTrial")
1707 {
1708 return Guild.CurrentQuest is QuestGuildMage && Guild.CurrentQuest.phase == 0 && EMono.pc.things.Find("letter_trial", -1, -1) != null;
1709 }
1710 }
1711 }
1712 else if (text == "costRecruit")
1713 {
1714 return EMono.Branch == null || !EMono.Branch.IsRecruit(this.tg.chara) || EMono.pc.GetCurrency("money2") >= CalcGold.Hire(this.tg.chara);
1715 }
1716 }
1717 else if (num != 358681176U)
1718 {
1719 if (num == 439160533U)
1720 {
1721 if (text == "merchant")
1722 {
1723 return Guild.Current == Guild.Merchant;
1724 }
1725 }
1726 }
1727 else if (text == "hasDLC")
1728 {
1729 return Steam.HasDLC(array[1].ToEnum(true));
1730 }
1731 }
1732 else if (num <= 984623250U)
1733 {
1734 if (num != 614694486U)
1735 {
1736 if (num == 984623250U)
1737 {
1738 if (text == "sister_money")
1739 {
1740 return EMono.pc.GetCurrency("money") >= 10000;
1741 }
1742 }
1743 }
1744 else if (text == "!hasFlag")
1745 {
1746 return EMono.player.dialogFlags.TryGetValue(array[1], 0) == 0;
1747 }
1748 }
1749 else if (num != 1239527074U)
1750 {
1751 if (num != 2036404098U)
1752 {
1753 if (num == 2044268227U)
1754 {
1755 if (text == "thief")
1756 {
1757 return Guild.Current == Guild.Thief;
1758 }
1759 }
1760 }
1761 else if (text == "fighter")
1762 {
1763 return Guild.Current == Guild.Fighter;
1764 }
1765 }
1766 else if (text == "fiamaPet")
1767 {
1768 if (EMono.pc.homeBranch != null)
1769 {
1770 foreach (Chara chara in EMono.pc.homeBranch.members)
1771 {
1772 if (chara.isDead && chara.GetInt(100, null) != 0)
1773 {
1774 return true;
1775 }
1776 }
1777 return false;
1778 }
1779 return false;
1780 }
1781 }
1782 else if (num <= 3303594084U)
1783 {
1784 if (num <= 2050511405U)
1785 {
1786 if (num != 2045191971U)
1787 {
1788 if (num == 2050511405U)
1789 {
1790 if (text == "hasFlag")
1791 {
1792 return EMono.player.dialogFlags.TryGetValue(array[1], 0) != 0;
1793 }
1794 }
1795 }
1796 else if (text == "guild_promote")
1797 {
1798 return Guild.Current.relation.exp >= Guild.Current.relation.ExpToNext;
1799 }
1800 }
1801 else if (num != 2247815201U)
1802 {
1803 if (num == 3303594084U)
1804 {
1805 if (text == "hasItem")
1806 {
1807 return EMono.pc.things.Find(array[1], -1, -1) != null;
1808 }
1809 }
1810 }
1811 else if (text == "hasMelilithCurse")
1812 {
1813 return EMono.player.flags.gotMelilithCurse;
1814 }
1815 }
1816 else if (num <= 3447015858U)
1817 {
1818 if (num != 3408510114U)
1819 {
1820 if (num == 3447015858U)
1821 {
1822 if (text == "costRecruitTicket")
1823 {
1824 return EMono.Branch != null && EMono.Branch.IsRecruit(this.tg.chara) && EMono.pc.things.Find("ticket_resident", -1, -1) != null;
1825 }
1826 }
1827 }
1828 else if (text == "isCompleted")
1829 {
1830 return EMono.game.quests.IsCompleted(array[1]);
1831 }
1832 }
1833 else if (num != 3634784398U)
1834 {
1835 if (num != 3785939139U)
1836 {
1837 if (num == 3914661895U)
1838 {
1839 if (text == "guild_maxpromote")
1840 {
1841 return Guild.Current.relation.rank >= Guild.Current.relation.MaxRank;
1842 }
1843 }
1844 }
1845 else if (text == "mage")
1846 {
1847 return Guild.Current == Guild.Mage;
1848 }
1849 }
1850 else if (text == "scratch_check")
1851 {
1852 return EMono.game.dateScratch > EMono.game.world.date.GetRaw(0);
1853 }
1854 if (array.Length > 2)
1855 {
1856 int num2;
1857 bool flag = EMono.player.dialogFlags.TryGetValue(array[1], out num2);
1858 int num4;
1859 if (array[1].StartsWith("*"))
1860 {
1861 string text2 = array[1].TrimStart('*');
1862 Quest quest = EMono.game.quests.Get(text2);
1863 if (text2 == "guild")
1864 {
1865 quest = Guild.CurrentQuest;
1866 }
1867 flag = (quest != null);
1868 if (EMono.game.quests.completedIDs.Contains(text2))
1869 {
1870 num2 = 999;
1871 flag = true;
1872 }
1873 else if (quest == null)
1874 {
1875 num2 = -1;
1876 }
1877 else
1878 {
1879 num2 = quest.phase;
1880 }
1881 int num3;
1882 if (int.TryParse(array[2], out num3))
1883 {
1884 num4 = num3;
1885 }
1886 else
1887 {
1888 num4 = ((quest != null) ? array[2].ToInt(quest.GetType()) : 0);
1889 }
1890 }
1891 else
1892 {
1893 num4 = int.Parse(array[2]);
1894 }
1895 text = array[0];
1896 if (!(text == "="))
1897 {
1898 if (!(text == "!"))
1899 {
1900 if (!(text == ">"))
1901 {
1902 if (!(text == ">="))
1903 {
1904 if (!(text == "<"))
1905 {
1906 if (text == "<=")
1907 {
1908 if (!flag || num2 <= num4)
1909 {
1910 return true;
1911 }
1912 }
1913 }
1914 else if (!flag || num2 < num4)
1915 {
1916 return true;
1917 }
1918 }
1919 else if (flag && num2 >= num4)
1920 {
1921 return true;
1922 }
1923 }
1924 else if (flag && num2 > num4)
1925 {
1926 return true;
1927 }
1928 }
1929 else if (!flag || num2 != num4)
1930 {
1931 return true;
1932 }
1933 }
1934 else
1935 {
1936 if (!flag && num4 == -1)
1937 {
1938 return true;
1939 }
1940 if (flag && num2 == num4)
1941 {
1942 return true;
1943 }
1944 }
1945 return false;
1946 }
1947 return this.setup.tag == IF;
1948 }
1949
1950 // Token: 0x06000733 RID: 1843 RVA: 0x0002E008 File Offset: 0x0002C208
1951 public void Show()
1952 {
1953 SE.PopDrama();
1954 this.layer.SetActive(true);
1955 this.layer.cg.alpha = 0f;
1956 this.layer.cg.DOFade(1f, 0.3f);
1957 }
1958
1959 // Token: 0x06000734 RID: 1844 RVA: 0x0002E056 File Offset: 0x0002C256
1960 public void Hide()
1961 {
1962 this.layer.SetActive(false);
1963 }
1964
1965 // Token: 0x04000770 RID: 1904
1966 public static Chara TG;
1967
1968 // Token: 0x04000771 RID: 1905
1969 public LayerDrama layer;
1970
1971 // Token: 0x04000772 RID: 1906
1972 public CanvasGroup cg;
1973
1974 // Token: 0x04000773 RID: 1907
1975 public CanvasGroup cgCover;
1976
1977 // Token: 0x04000774 RID: 1908
1978 public UIDynamicList listCredit;
1979
1980 // Token: 0x04000775 RID: 1909
1981 public Transform actorPos;
1982
1983 // Token: 0x04000776 RID: 1910
1984 public Transform endroll;
1985
1986 // Token: 0x04000777 RID: 1911
1987 public DramaActor moldActor;
1988
1989 // Token: 0x04000778 RID: 1912
1990 public DramaSequence sequence;
1991
1992 // Token: 0x04000779 RID: 1913
1993 public DramaOutcome outcome;
1994
1995 // Token: 0x0400077A RID: 1914
1996 public DialogDrama dialog;
1997
1998 // Token: 0x0400077B RID: 1915
1999 public DramaSetup setup;
2000
2001 // Token: 0x0400077C RID: 1916
2002 public GameObject goSkip;
2003
2004 // Token: 0x0400077D RID: 1917
2005 public Image imageBG;
2006
2007 // Token: 0x0400077E RID: 1918
2008 public Image imageCover;
2009
2010 // Token: 0x0400077F RID: 1919
2011 public Font[] fonts;
2012
2013 // Token: 0x04000780 RID: 1920
2014 public Person tg;
2015
2016 // Token: 0x04000781 RID: 1921
2017 public bool bgmChanged;
2018
2019 // Token: 0x04000782 RID: 1922
2020 private List<DramaEvent> customEvents = new List<DramaEvent>();
2021
2022 // Token: 0x04000783 RID: 1923
2023 public List<DramaChoice> _choices = new List<DramaChoice>();
2024
2025 // Token: 0x04000784 RID: 1924
2026 public Dictionary<string, string> customTalkTopics = new Dictionary<string, string>();
2027
2028 // Token: 0x04000785 RID: 1925
2029 public Dictionary<string, string> dictLocalize = new Dictionary<string, string>();
2030
2031 // Token: 0x04000786 RID: 1926
2032 public float creditSpeed;
2033
2034 // Token: 0x04000787 RID: 1927
2035 private string lastIF;
2036
2037 // Token: 0x04000788 RID: 1928
2038 private string lastIF2;
2039
2040 // Token: 0x04000789 RID: 1929
2041 public DramaEventTalk lastTalk;
2042
2043 // Token: 0x0400078A RID: 1930
2044 public bool enableTone;
2045
2046 // Token: 0x0400078B RID: 1931
2047 public bool customEventsAdded;
2048
2049 // Token: 0x0400078C RID: 1932
2050 public bool idDefaultPassed;
2051
2052 // Token: 0x0400078D RID: 1933
2053 public int countLine;
2054
2055 // Token: 0x0400078E RID: 1934
2056 private string idDefault;
2057
2058 // Token: 0x0400078F RID: 1935
2059 private string textReplace;
2060
2061 // Token: 0x04000790 RID: 1936
2062 public static Dictionary<string, ExcelData> dictCache = new Dictionary<string, ExcelData>();
2063}
Definition Chara.cs:12
Definition EMono.cs:6
Definition Guild.cs:5
Definition Msg.cs:7
Definition Point.cs:11
Definition Quest.cs:8
Definition Steam.cs:11
Definition Thing.cs:10
Definition Zone.cs:14