Elin Modding Docs Doc
Loading...
Searching...
No Matches
Player.cs
1using System;
2using System.Collections.Generic;
3using System.IO;
4using System.Linq;
5using System.Runtime.CompilerServices;
6using System.Runtime.Serialization;
7using System.Text;
8using Newtonsoft.Json;
9using UnityEngine;
10
11// Token: 0x020000BF RID: 191
12public class Player : EClass
13{
14 // Token: 0x1700010C RID: 268
15 // (get) Token: 0x060004ED RID: 1261 RVA: 0x000224C5 File Offset: 0x000206C5
16 // (set) Token: 0x060004EE RID: 1262 RVA: 0x000224DC File Offset: 0x000206DC
17 public WidgetManager.SaveData widgets
18 {
19 get
20 {
21 if (!this.useSubWidgetTheme)
22 {
23 return this.mainWidgets;
24 }
25 return this.subWidgets;
26 }
27 set
28 {
29 if (this.useSubWidgetTheme)
30 {
31 this.subWidgets = value;
32 return;
33 }
34 this.mainWidgets = value;
35 }
36 }
37
38 // Token: 0x1700010D RID: 269
39 // (get) Token: 0x060004EF RID: 1263 RVA: 0x000224F5 File Offset: 0x000206F5
40 // (set) Token: 0x060004F0 RID: 1264 RVA: 0x00022502 File Offset: 0x00020702
41 public Zone spawnZone
42 {
43 get
44 {
45 return RefZone.Get(this.uidSpawnZone);
46 }
47 set
48 {
49 this.uidSpawnZone = RefZone.Set(value);
50 }
51 }
52
53 // Token: 0x1700010E RID: 270
54 // (get) Token: 0x060004F1 RID: 1265 RVA: 0x00022510 File Offset: 0x00020710
55 public bool EnableDreamStory
56 {
57 get
58 {
59 return false;
60 }
61 }
62
63 // Token: 0x1700010F RID: 271
64 // (get) Token: 0x060004F2 RID: 1266 RVA: 0x00022513 File Offset: 0x00020713
65 public Zone LastTravelZone
66 {
67 get
68 {
69 return RefZone.Get(this.uidLastTravelZone);
70 }
71 }
72
73 // Token: 0x17000110 RID: 272
74 // (get) Token: 0x060004F3 RID: 1267 RVA: 0x00022520 File Offset: 0x00020720
75 public Zone LastZone
76 {
77 get
78 {
79 return RefZone.Get(this.uidLastZone);
80 }
81 }
82
83 // Token: 0x17000111 RID: 273
84 // (get) Token: 0x060004F4 RID: 1268 RVA: 0x0002252D File Offset: 0x0002072D
85 public Chara Agent
86 {
87 get
88 {
89 return this._agent;
90 }
91 }
92
93 // Token: 0x17000112 RID: 274
94 // (get) Token: 0x060004F5 RID: 1269 RVA: 0x00022535 File Offset: 0x00020735
95 public int ContainerSearchDistance
96 {
97 get
98 {
99 return 1 + EClass.pc.elements.GetFeatRef(1643, 0);
100 }
101 }
102
103 // Token: 0x17000113 RID: 275
104 // (get) Token: 0x060004F6 RID: 1270 RVA: 0x0002254E File Offset: 0x0002074E
105 public int MaxAlly
106 {
107 get
108 {
109 return Mathf.Min(Mathf.Max(EClass.pc.CHA / 10, 1), 5) + EClass.pc.Evalue(1645);
110 }
111 }
112
113 // Token: 0x17000114 RID: 276
114 // (get) Token: 0x060004F7 RID: 1271 RVA: 0x00022579 File Offset: 0x00020779
115 public int MaxExpKnowledge
116 {
117 get
118 {
119 return 1000;
120 }
121 }
122
123 // Token: 0x17000115 RID: 277
124 // (get) Token: 0x060004F8 RID: 1272 RVA: 0x00022580 File Offset: 0x00020780
125 public int MaxExpInfluence
126 {
127 get
128 {
129 return 1000;
130 }
131 }
132
133 // Token: 0x17000116 RID: 278
134 // (get) Token: 0x060004F9 RID: 1273 RVA: 0x00022587 File Offset: 0x00020787
135 public bool IsMageGuildMember
136 {
137 get
138 {
139 Quest quest = EClass.game.quests.Get("guild_mage");
140 return quest != null && quest.phase >= 10;
141 }
142 }
143
144 // Token: 0x17000117 RID: 279
145 // (get) Token: 0x060004FA RID: 1274 RVA: 0x000225AF File Offset: 0x000207AF
146 public bool IsFighterGuildMember
147 {
148 get
149 {
150 Quest quest = EClass.game.quests.Get("guild_fighter");
151 return quest != null && quest.phase >= 10;
152 }
153 }
154
155 // Token: 0x17000118 RID: 280
156 // (get) Token: 0x060004FB RID: 1275 RVA: 0x000225D7 File Offset: 0x000207D7
157 public bool IsThiefGuildMember
158 {
159 get
160 {
161 Quest quest = EClass.game.quests.Get("guild_thief");
162 return quest != null && quest.phase >= 10;
163 }
164 }
165
166 // Token: 0x17000119 RID: 281
167 // (get) Token: 0x060004FC RID: 1276 RVA: 0x000225FF File Offset: 0x000207FF
168 public bool IsMerchantGuildMember
169 {
170 get
171 {
172 Quest quest = EClass.game.quests.Get("guild_merchant");
173 return quest != null && quest.phase >= 10;
174 }
175 }
176
177 // Token: 0x1700011A RID: 282
178 // (get) Token: 0x060004FD RID: 1277 RVA: 0x00022627 File Offset: 0x00020827
179 public bool IsCriminal
180 {
181 get
182 {
183 return this.karma < 0 && !EClass.pc.HasCondition<ConIncognito>();
184 }
185 }
186
187 // Token: 0x060004FE RID: 1278 RVA: 0x00022644 File Offset: 0x00020844
188 public void OnCreateGame()
189 {
190 this.karma = 30;
191 this.debt = 20000000;
192 this.chara = CharaGen.Create("chara", -1);
193 this.chara.SetFaction(EClass.Home);
194 this.chara.things.SetSize(7, 5);
195 this.chara.c_idTone = "default";
196 this.chara.SetInt(56, 1);
197 this.chara.things.DestroyAll(null);
198 this.chara.faith = EClass.game.religions.Eyth;
199 this.chara.RefreshFaithElement();
200 this.uidChara = this.chara.uid;
201 Fav fav = IO.LoadFile<Fav>(CorePath.user + "PCC/fav" + EClass.rnd(3).ToString(), false, null);
202 this.chara.pccData = IO.Duplicate<PCCData>(fav.data);
203 this.chara._CreateRenderer();
204 this.RefreshDomain();
205 this._agent = CharaGen.Create("chara", -1);
206 this._agent.c_altName = "stash".lang();
207 EClass.player.title = "master".lang();
208 this.nums.OnCreateGame();
209 this.hotbars.OnCreateGame();
210 this.baseActTime = EClass.setting.defaultActPace;
211 this.flags.OnCreateGame();
212 this.sketches.Add(115);
213 this.pref.sort_ascending_shop = true;
214 this.layerAbilityConfig.hideDepletedSpell = true;
215 this.layerAbilityConfig.bgAlpha = 70;
216 this.memo = "memo_blank".lang();
217 }
218
219 // Token: 0x060004FF RID: 1279 RVA: 0x000227F8 File Offset: 0x000209F8
220 public void OnStartNewGame()
221 {
222 this.ModKeyItem("old_charm", 1, false);
223 this.ModKeyItem("backpack", 1, false);
224 EClass.player.knownBGMs.Add(1);
225 EClass.player.knownBGMs.Add(3);
226 EClass.player.questTracker = true;
227 this.trackedCategories.Add("food");
228 this.trackedCategories.Add("drink");
229 this.trackedCategories.Add("resource");
230 EClass.game.quests.Start("main", null, true);
231 this.chara.hp = this.chara.MaxHP;
232 this.chara.SetFaith(EClass.game.religions.list[0]);
233 this.chara.elements.SetBase(135, 1, 0);
234 this.chara.elements.SetBase(6003, 1, 0);
235 this.chara.elements.SetBase(6012, 1, 0);
236 this.chara.elements.SetBase(6015, 1, 0);
237 this.chara.elements.SetBase(6050, 1, 0);
238 List<Element> list = new List<Element>();
239 foreach (Element item in EClass.pc.elements.dict.Values)
240 {
241 list.Add(item);
242 }
243 foreach (Element element in list)
244 {
245 if (element.Value == 0)
246 {
247 EClass.pc.elements.Remove(element.id);
248 }
249 else if (element.HasTag("primary"))
250 {
251 element.vTempPotential = Mathf.Max(30, (element.ValueWithoutLink - 8) * 7);
252 }
253 }
254 foreach (BodySlot slot in this.chara.body.slots)
255 {
256 this.chara.body.Unequip(slot, true);
257 }
258 this.chara.things.DestroyAll(null);
259 this.CreateEquip();
260 this.dateTravel = EClass.world.date.GetRaw(0);
261 this.uidLastTravelZone = EClass.pc.currentZone.uid;
262 this.GenerateBackgroundText();
263 if (!EClass.game.Difficulty.allowRevive)
264 {
265 EClass.pc.SetFeat(1220, 1, false);
266 }
267 EClass.pc.elements.CheckSkillActions();
268 EClass.pc.hunger.value = 30;
269 EClass.pc.CalculateMaxStamina();
270 EClass.pc.stamina.Set(EClass.pc.stamina.max / 2);
271 EClass.pc.Refresh(false);
272 this.isEditor = Application.isEditor;
273 }
274
275 // Token: 0x06000500 RID: 1280 RVA: 0x00022B44 File Offset: 0x00020D44
276 public void OnLoad()
277 {
278 this.nums.OnLoad();
279 this.codex.OnLoad();
280 if (this.dataWindow != null)
281 {
282 Window.dictData = this.dataWindow;
283 }
284 EClass.pc.Refresh(false);
285 if (Application.isEditor && EClass.debug.resetPlayerConfig && !this.isEditor)
286 {
287 EClass.game.config = new Game.Config();
288 this.dataWindow.Clear();
289 EClass.pc.things.Foreach(delegate(Thing t)
290 {
291 t.c_windowSaveData = null;
292 }, false);
293 }
294 this.isEditor = Application.isEditor;
295 }
296
297 // Token: 0x06000501 RID: 1281 RVA: 0x00022BF4 File Offset: 0x00020DF4
298 public void OnBeforeSave()
299 {
300 foreach (Layer comp in EClass.ui.layerFloat.layers)
301 {
302 foreach (Window window in comp.GetComponentsInDirectChildren(true))
303 {
304 window.UpdateSaveData();
305 }
306 }
307 this.dataWindow = Window.dictData;
308 }
309
310 // Token: 0x06000502 RID: 1282 RVA: 0x00022C94 File Offset: 0x00020E94
311 public void OnAdvanceRealHour()
312 {
313 Player.realHour++;
314 Msg.Say("time_warn", Player.realHour.ToString() ?? "", null, null, null);
315 string text = "time_warn_" + Player.realHour.ToString();
316 if (LangGame.Has(text))
317 {
318 Msg.Say(text);
319 }
320 }
321
322 // Token: 0x06000503 RID: 1283 RVA: 0x00022CF4 File Offset: 0x00020EF4
323 public void RefreshDomain()
324 {
325 this.domains.Clear();
326 for (int i = 0; i < EClass.pc.job.domain.Length; i += 2)
327 {
328 this.domains.Add(EClass.pc.job.domain[i]);
329 }
330 }
331
332 // Token: 0x06000504 RID: 1284 RVA: 0x00022D44 File Offset: 0x00020F44
333 public ElementContainer GetDomains()
334 {
335 ElementContainer elementContainer = new ElementContainer();
336 foreach (int id in this.domains)
337 {
338 elementContainer.GetOrCreateElement(id).vSource = 1;
339 }
340 return elementContainer;
341 }
342
343 // Token: 0x06000505 RID: 1285 RVA: 0x00022DA4 File Offset: 0x00020FA4
344 public Layer SelectDomain(Action onKill = null)
345 {
346 List<SourceElement.Row> list2 = new List<SourceElement.Row>();
347 foreach (SourceElement.Row row in EClass.sources.elements.rows)
348 {
349 if (row.categorySub == "eleAttack" && !row.tag.Contains("hidden") && (!row.tag.Contains("high") || EClass.pc.job.domain.Contains(row.id)))
350 {
351 list2.Add(row);
352 }
353 }
354 return EClass.ui.AddLayer<LayerList>().SetListCheck<SourceElement.Row>(list2, (SourceElement.Row a) => a.GetName(), delegate(SourceElement.Row s, ItemGeneral b)
355 {
356 bool flag = false;
357 foreach (int num in EClass.player.domains)
358 {
359 if (s.id == num)
360 {
361 flag = true;
362 }
363 }
364 if (flag)
365 {
366 EClass.player.domains.Remove(s.id);
367 return;
368 }
369 EClass.player.domains.Add(s.id);
370 }, delegate(List<UIList.ButtonPair> list)
371 {
372 bool flag = EClass.player.domains.Count >= 3 + EClass.pc.Evalue(1402);
373 foreach (UIList.ButtonPair buttonPair in list)
374 {
375 UIButton button = (buttonPair.component as ItemGeneral).button1;
376 SourceElement.Row row2 = buttonPair.obj as SourceElement.Row;
377 bool flag2 = false;
378 bool flag3 = false;
379 foreach (int num in EClass.player.domains)
380 {
381 if (row2.id == num)
382 {
383 flag3 = true;
384 }
385 }
386 button.SetCheck(flag3);
387 for (int i = 0; i < ((EClass.pc.job.id == "swordsage") ? 5 : 3); i++)
388 {
389 if (EClass.pc.job.domain[i * 2] == row2.id)
390 {
391 flag2 = true;
392 }
393 }
394 button.interactable = (!flag2 && (!flag || flag3));
395 button.GetComponent<CanvasGroup>().enabled = !button.interactable;
396 }
397 }).SetOnKill(delegate
398 {
399 Action onKill2 = onKill;
400 if (onKill2 == null)
401 {
402 return;
403 }
404 onKill2();
405 });
406 }
407
408 // Token: 0x06000506 RID: 1286 RVA: 0x00022EE4 File Offset: 0x000210E4
409 public void RefreshEmptyAlly()
410 {
411 int num = this.MaxAlly - EClass.pc.party.members.Count + 1;
412 if (num != this.lastEmptyAlly)
413 {
414 this.lastEmptyAlly = num;
415 foreach (Chara chara in EClass.pc.party.members)
416 {
417 chara.RefreshSpeed();
418 }
419 }
420 }
421
422 // Token: 0x06000507 RID: 1287 RVA: 0x00022F6C File Offset: 0x0002116C
423 public void GenerateBackgroundText()
424 {
425 string text = IO.LoadText(new DirectoryInfo(CorePath.CorePackage.Background).GetFiles("*.txt").RandomItem<FileInfo>().FullName);
426 IO.SaveText(GameIO.pathCurrentSave + "background.txt", text);
427 }
428
429 // Token: 0x06000508 RID: 1288 RVA: 0x00022FB4 File Offset: 0x000211B4
430 public string GetBackgroundText()
431 {
432 StringBuilder stringBuilder = new StringBuilder(IO.LoadText(GameIO.pathCurrentSave + "background.txt"));
433 stringBuilder.Replace("#name", EClass.pc.NameSimple);
434 stringBuilder.Replace("#aka", EClass.pc.Aka);
435 stringBuilder.Replace("#father", EClass.pc.bio.nameDad);
436 stringBuilder.Replace("#mother", EClass.pc.bio.nameMom);
437 stringBuilder.Replace("#birthloc2", EClass.pc.bio.nameHome);
438 stringBuilder.Replace("#birthloc", EClass.pc.bio.nameLoc);
439 stringBuilder.Replace("#job", EClass.pc.job.GetName().AddArticle());
440 stringBuilder.Replace("#year", EClass.pc.bio.birthYear.ToString() ?? "");
441 stringBuilder.Replace("#month", EClass.pc.bio.birthMonth.ToString() ?? "");
442 stringBuilder.Replace("#day", EClass.pc.bio.birthDay.ToString() ?? "");
443 stringBuilder.Replace("#he", (EClass.pc.IsMale ? "he" : "she").lang());
444 stringBuilder.Replace("#his", (EClass.pc.IsMale ? "his" : "her").lang());
445 stringBuilder.Replace("#him", (EClass.pc.IsMale ? "him" : "her").lang());
446 string text = "_period".lang();
447 string[] array = stringBuilder.ToString().Split(text, StringSplitOptions.None);
448 string text2 = "";
449 if (array.Length != 0)
450 {
451 foreach (string text3 in array)
452 {
453 text2 += text3.ToTitleCase(false);
454 if (text3 != text && text3 != Environment.NewLine && text3.Length > 2 && text3 != array[array.Length - 1])
455 {
456 text2 += text;
457 }
458 }
459 }
460 return text2.TrimEnd(Environment.NewLine.ToCharArray());
461 }
462
463 // Token: 0x06000509 RID: 1289 RVA: 0x00023224 File Offset: 0x00021424
464 public void EditBackgroundText()
465 {
466 Util.Run(GameIO.pathCurrentSave + "background.txt");
467 }
468
469 // Token: 0x0600050A RID: 1290 RVA: 0x0002323C File Offset: 0x0002143C
470 public void CreateEquip()
471 {
472 Chara pc = EClass.pc;
473 pc.body.AddBodyPart(45, null);
474 if (EClass.debug.enable)
475 {
476 EClass.pc.EQ_ID("lantern_old", -1, Rarity.Random);
477 }
478 pc.body.AddBodyPart(44, null);
479 pc.EQ_ID("toolbelt", -1, Rarity.Random).c_IDTState = 0;
480 pc.EQ_ID("shirt", -1, Rarity.Random).c_IDTState = 0;
481 pc.AddCard(ThingGen.CreateCurrency(1 + EClass.rnd(5), "money"));
482 string id = EClass.pc.job.id;
483 if (!(id == "paladin"))
484 {
485 if (!(id == "inquisitor"))
486 {
487 if (!(id == "witch"))
488 {
489 if (id == "swordsage")
490 {
491 pc.AddCard(Player.<CreateEquip>g__SetSpellbook|170_0(ThingGen.CreateSpellbook(50300, 1), 4));
492 pc.AddCard(Player.<CreateEquip>g__SetSpellbook|170_0(ThingGen.CreateSpellbook(50301, 1), 4));
493 pc.AddCard(Player.<CreateEquip>g__SetSpellbook|170_0(ThingGen.CreateSpellbook(50802, 1), 2));
494 pc.AddCard(ThingGen.Create("tool_talisman", -1, -1));
495 }
496 }
497 else
498 {
499 pc.AddCard(Player.<CreateEquip>g__SetSpellbook|170_0(ThingGen.CreateSpellbook(8790, 1), 4));
500 }
501 }
502 else
503 {
504 pc.AddCard(Player.<CreateEquip>g__SetSpellbook|170_0(ThingGen.CreateSpellbook(8706, 1), 4));
505 }
506 }
507 else
508 {
509 pc.AddCard(Player.<CreateEquip>g__SetSpellbook|170_0(ThingGen.CreateSpellbook(8400, 1), 2));
510 }
511 id = EClass.pc.job.id;
512 if (!(id == "wizard") && !(id == "warmage") && !(id == "priest") && !(id == "witch"))
513 {
514 pc.AddCard(ThingGen.Create("bandage", -1, -1).SetNum(6 + EClass.rnd(3)));
515 return;
516 }
517 int num = 0;
518 foreach (int id2 in EClass.player.domains)
519 {
520 Element element = Element.Create(id2, 0);
521 string text = "";
522 foreach (string text2 in element.source.tag)
523 {
524 if (text != "")
525 {
526 break;
527 }
528 if (text2 == "hand" || text2 == "arrow" || text2 == "bolt")
529 {
530 text = text2 + "_";
531 }
532 }
533 if (text != "")
534 {
535 pc.AddCard(Player.<CreateEquip>g__SetSpellbook|170_0(ThingGen.CreateSpellbook(text + element.source.alias.Replace("ele", ""), 1), 4));
536 num++;
537 if (num >= 2)
538 {
539 break;
540 }
541 }
542 }
543 if (EClass.pc.job.id == "priest")
544 {
545 pc.AddCard(Player.<CreateEquip>g__SetSpellbook|170_0(ThingGen.CreateSpellbook(8400, 1), 2));
546 return;
547 }
548 pc.AddCard(Player.<CreateEquip>g__SetSpellbook|170_0(ThingGen.CreateSpellbook(8200, 1), 2));
549 }
550
551 // Token: 0x0600050B RID: 1291 RVA: 0x00023594 File Offset: 0x00021794
552 public void DreamSpell()
553 {
554 int num = EClass.pc.Evalue(1653);
555 if (num == 0 && EClass.pc.Evalue(1402) == 0 && EClass.rnd(4) != 0)
556 {
557 return;
558 }
559 List<SourceElement.Row> list = new List<SourceElement.Row>();
560 foreach (int id in EClass.player.domains)
561 {
562 Element element = Element.Create(id, 0);
563 string a2 = "";
564 foreach (string text in element.source.tag)
565 {
566 if (a2 != "")
567 {
568 break;
569 }
570 bool flag = false;
571 if (text == "hand" || text == "arrow" || text == "bolt")
572 {
573 flag = true;
574 }
575 if (num >= 3 && (text == "ball" || text == "weapon" || text == "funnel" || text == "miasma"))
576 {
577 flag = true;
578 }
579 if (flag)
580 {
581 list.Add(EClass.sources.elements.alias[text + "_" + element.source.alias.Replace("ele", "")]);
582 }
583 }
584 }
585 if (list.Count == 0)
586 {
587 return;
588 }
589 SourceElement.Row row = list.RandomItemWeighted((SourceElement.Row a) => (float)a.chance);
590 Element element2 = EClass.pc.elements.GetElement(row.id);
591 int mtp = (num == 0) ? 100 : (75 + num * 25);
592 if (num > 0 || element2 == null || element2.vPotential == 0)
593 {
594 Msg.Say("dream_spell", EClass.sources.elements.alias[row.aliasRef].GetText("altname", false).Split(',', StringSplitOptions.None)[0].ToLower(), null, null, null);
595 EClass.pc.GainAbility(row.id, mtp);
596 }
597 }
598
599 // Token: 0x0600050C RID: 1292 RVA: 0x000237E4 File Offset: 0x000219E4
600 public void SimulateFaction()
601 {
602 this.simulatingZone = true;
603 Zone currentZone = EClass.pc.currentZone;
604 Point point = EClass.pc.pos.Copy();
605 foreach (FactionBranch factionBranch in EClass.pc.faction.GetChildren())
606 {
607 if (factionBranch.owner != currentZone)
608 {
609 EClass.pc.MoveZone(factionBranch.owner, ZoneTransition.EnterState.Auto);
610 this.zone = factionBranch.owner;
611 EClass.scene.Init(Scene.Mode.Zone);
612 }
613 }
614 EClass.pc.MoveZone(currentZone, new ZoneTransition
615 {
616 state = ZoneTransition.EnterState.Exact,
617 x = point.x,
618 z = point.z
619 });
620 this.zone = currentZone;
621 EClass.scene.Init(Scene.Mode.Zone);
622 this.simulatingZone = false;
623 }
624
625 // Token: 0x0600050D RID: 1293 RVA: 0x000238D8 File Offset: 0x00021AD8
626 public void ExitBorder(ActPlan p = null)
627 {
628 bool flag = EClass.game.quests.HasFarAwayEscort(false);
629 string textDialog = (flag ? "ExitZoneEscort" : "ExitZone").lang(EClass._zone.Name, null, null, null, null);
630 bool flag2 = EClass.pc.pos.x == EClass._map.bounds.x || EClass.pc.pos.x == EClass._map.bounds.x + EClass._map.bounds.Width - 1 || EClass.pc.pos.z == EClass._map.bounds.z || EClass.pc.pos.z == EClass._map.bounds.z + EClass._map.bounds.Height - 1;
631 if (flag || EClass.core.config.game.confirmMapExit || (EClass._zone.instance != null && EClass._zone.instance.WarnExit))
632 {
633 if (p == null)
634 {
635 Dialog.YesNo(textDialog, delegate
636 {
637 EClass.game.quests.HasFarAwayEscort(true);
638 EClass.pc.MoveZone(EClass._zone.ParentZone, ZoneTransition.EnterState.Auto);
639 }, delegate
640 {
641 }, "yes", "no");
642 return;
643 }
644 p.TrySetAct("actNewZone", delegate()
645 {
646 Dialog.YesNo(textDialog, delegate
647 {
648 EClass.game.quests.HasFarAwayEscort(true);
649 EClass.pc.MoveZone(EClass._zone.ParentZone, ZoneTransition.EnterState.Auto);
650 }, null, "yes", "no");
651 return false;
652 }, CursorSystem.MoveZone, flag2 ? 999 : 1);
653 return;
654 }
655 else
656 {
657 if (p == null)
658 {
659 EClass.pc.MoveZone(EClass._zone.ParentZone, ZoneTransition.EnterState.Auto);
660 return;
661 }
662 p.TrySetAct("actNewZone", delegate()
663 {
664 EClass.pc.MoveZone(EClass._zone.ParentZone, ZoneTransition.EnterState.Auto);
665 return false;
666 }, CursorSystem.MoveZone, flag2 ? 999 : 1);
667 return;
668 }
669 }
670
671 // Token: 0x0600050E RID: 1294 RVA: 0x00023AE0 File Offset: 0x00021CE0
672 public bool CanExitBorder(Point p)
673 {
674 return (EClass._zone != EClass.game.StartZone || EClass.pc.homeBranch != null) && !EClass._zone.BlockBorderExit && (EClass.pc.held == null || !EClass.pc.held.trait.CanOnlyCarry);
675 }
676
677 // Token: 0x0600050F RID: 1295 RVA: 0x00023B40 File Offset: 0x00021D40
678 public void OnExitBorder(Point p)
679 {
680 if (EClass._zone.ParentZone.IsRegion)
681 {
682 int num = 0;
683 int num2 = 0;
684 MapBounds bounds = EClass._map.bounds;
685 if (p.x < bounds.x)
686 {
687 num = -1;
688 }
689 else if (p.x > bounds.maxX)
690 {
691 num = 1;
692 }
693 else if (p.z < bounds.z)
694 {
695 num2 = -1;
696 }
697 else
698 {
699 num2 = 1;
700 }
701 ZoneTransition.EnterState state = (num == 1) ? ZoneTransition.EnterState.Left : ((num == -1) ? ZoneTransition.EnterState.Right : ((num2 == 1) ? ZoneTransition.EnterState.Bottom : ZoneTransition.EnterState.Top));
702 float ratePos = (num == 1 || num == -1) ? ((float)(p.z - bounds.z) / (float)bounds.Height) : ((float)(p.x - bounds.x) / (float)bounds.Width);
704 {
705 state = state,
706 ratePos = ratePos
707 };
708 Point p2 = new Point(EClass._zone.x + num, EClass._zone.y + num2);
709 this.EnterLocalZone(p2, trans, false);
710 return;
711 }
712 EClass.pc.MoveZone(EClass._zone.ParentZone, ZoneTransition.EnterState.Auto);
713 }
714
715 // Token: 0x06000510 RID: 1296 RVA: 0x00023C4D File Offset: 0x00021E4D
716 public void EnterLocalZone(bool encounter = false)
717 {
718 this.EnterLocalZone(EClass.pc.pos.Copy(), null, encounter);
719 }
720
721 // Token: 0x06000511 RID: 1297 RVA: 0x00023C68 File Offset: 0x00021E68
722 public void EnterLocalZone(Point p, ZoneTransition trans = null, bool encounter = false)
723 {
724 if (EClass._zone.IsRegion)
725 {
726 p.Set(p.x + EClass.scene.elomap.minX, p.z + EClass.scene.elomap.minY);
727 }
728 Zone zone = EClass._zone.Region.GetZoneAt(p.x, p.z);
729 int enemies = 1;
730 int roadDist = EClass.scene.elomap.GetRoadDist(p.x, p.z);
731 int num = (EClass.pc.homeBranch == null) ? 0 : EClass.pc.pos.Distance(EClass.game.StartZone.mapX, EClass.game.StartZone.mapY);
732 if (zone == null)
733 {
734 if (!EClass._zone.Region.CanCreateZone(p))
735 {
736 Msg.Say("zoneBlocked");
737 return;
738 }
739 int num2 = Mathf.Clamp(roadDist - 4, 0, 200) + Mathf.Clamp(num / 4, 0, 10);
740 if (roadDist > 20)
741 {
742 num2 += roadDist - 20;
743 }
744 if (num2 >= 100)
745 {
746 num2 = 100;
747 }
748 Debug.Log(string.Concat(new string[]
749 {
750 "encounter roadiDist:",
751 roadDist.ToString(),
752 " homeDist:",
753 num.ToString(),
754 " lv:",
755 num2.ToString()
756 }));
757 zone = EClass._zone.Region.CreateZone(p);
758 zone._dangerLv = num2;
759 enemies = 2 + Mathf.Min(num2 / 10, 4) + EClass.rnd(3 + Mathf.Min(num2 / 10, 4));
760 if (num < 5)
761 {
762 enemies = 2;
763 }
764 }
765 else
766 {
767 if (zone is Zone_Void && EClass.player.CountKeyItem("license_void") == 0)
768 {
769 Msg.Say("voidClosed");
770 return;
771 }
772 if (zone.IsClosed)
773 {
774 Msg.Say("zoneClosed");
775 return;
776 }
777 if (zone is Zone_Casino)
778 {
779 Msg.Say("zoneNoEntrance");
780 return;
781 }
782 }
783 if (trans == null)
784 {
785 ZoneTransition.EnterState state = encounter ? ZoneTransition.EnterState.Encounter : ((zone.RegionEnterState == ZoneTransition.EnterState.Dir) ? ZoneTransition.DirToState(EClass.pc.GetCurrentDir()) : zone.RegionEnterState);
786 trans = new ZoneTransition
787 {
788 state = state
789 };
790 }
791 EClass.pc.MoveZone(zone, trans);
792 if (encounter)
793 {
794 zone.events.AddPreEnter(new ZonePreEnterEncounter
795 {
796 enemies = enemies,
797 roadDist = roadDist
798 }, true);
799 }
800 }
801
802 // Token: 0x06000512 RID: 1298 RVA: 0x00023EC0 File Offset: 0x000220C0
803 public void MoveZone(Zone z)
804 {
805 CursorSystem.ignoreCount = 15;
806 EClass.ui.hud.transRight.SetActive(false);
807 this.zone = z;
808 if (this.zone.IsRegion)
809 {
810 this.dateTravel = EClass.world.date.GetRaw(0);
811 }
812 EClass.scene.Init(Scene.Mode.Zone);
813 if (WidgetRoster.Instance)
814 {
815 WidgetRoster.Instance.OnMoveZone();
816 }
817 if (UIResourceTrack.Instance)
818 {
819 UIResourceTrack.Instance.OnMoveZone();
820 }
821 if (WidgetMinimap.Instance)
822 {
823 WidgetMinimap.Instance.OnMoveZone();
824 }
825 if (EClass.pc.currentZone == this.zone && !this.zone.IsRegion && this.LastTravelZone != this.zone)
826 {
827 if (this.LastTravelZone != null)
828 {
829 int num = EClass.world.date.GetElapsedHour(this.dateTravel);
830 int num2 = num / 24;
831 if (this.distanceTravel > 2)
832 {
833 num %= 24;
834 Msg.Say("travel", this.LastTravelZone.Name, Date.GetText(this.dateTravel, Date.TextFormat.Travel), num2.ToString() ?? "", num.ToString() ?? "");
835 Msg.Say("travel2", this.distanceTravel.ToString() ?? "", ((EClass.pc.party.members.Count == 1) ? "you" : "youAndCompanion").lang(), null, null);
836 foreach (Chara chara in EClass.pc.party.members)
837 {
838 chara.AddExp(this.distanceTravel / 3);
839 chara.elements.ModExp(240, 30 + this.distanceTravel * 5, false);
840 }
841 }
842 }
843 this.distanceTravel = 0;
844 this.dateTravel = EClass.world.date.GetRaw(0);
845 this.uidLastTravelZone = this.zone.uid;
846 }
847 this.regionMoveWarned = false;
848 }
849
850 // Token: 0x06000513 RID: 1299 RVA: 0x00024100 File Offset: 0x00022300
851 public void AddInventory(Card c)
852 {
853 EClass.pc.AddCard(c);
854 }
855
856 // Token: 0x06000514 RID: 1300 RVA: 0x0002410E File Offset: 0x0002230E
857 public void EndTurn(bool consume = true)
858 {
859 if (EClass.pc.isDead)
860 {
861 return;
862 }
863 if (consume)
864 {
865 EInput.Consume(false, 1);
866 }
867 EClass.pc.SetAI(new GoalEndTurn());
868 EClass.player.baseActTime = EClass.setting.defaultActPace;
869 }
870
871 // Token: 0x06000515 RID: 1301 RVA: 0x0002414C File Offset: 0x0002234C
872 public void ModFame(int a)
873 {
874 if (a == 0)
875 {
876 return;
877 }
878 if (a >= 0 && this.fame + a >= 5000 && EClass.player.CountKeyItem("license_adv") == 0)
879 {
880 a = 5000 - this.fame;
881 if (a <= 0)
882 {
883 a = 0;
884 Msg.Say("gainFameLimit");
885 return;
886 }
887 }
888 this.fame += a;
889 if (this.fame < 0)
890 {
891 this.fame = 0;
892 }
893 if (a > 0)
894 {
895 Msg.Say("gainFame", a.ToString() ?? "", null, null, null);
896 }
897 else
898 {
899 Msg.Say("looseFame", (-a).ToString() ?? "", null, null, null);
900 }
901 if (a > 0)
902 {
903 Tutorial.Reserve("fame", null);
904 }
905 }
906
907 // Token: 0x06000516 RID: 1302 RVA: 0x00024214 File Offset: 0x00022414
908 public void ModKeyItem(string alias, int num = 1, bool msg = true)
909 {
910 this.ModKeyItem(EClass.sources.keyItems.alias[alias].id, num, msg);
911 }
912
913 // Token: 0x06000517 RID: 1303 RVA: 0x00024238 File Offset: 0x00022438
914 public void ModKeyItem(int id, int num = 1, bool msg = true)
915 {
916 if (!this.keyItems.ContainsKey(id))
917 {
918 this.keyItems.Add(id, 0);
919 }
920 Dictionary<int, int> dictionary = this.keyItems;
921 dictionary[id] += num;
922 if (msg)
923 {
924 if (num > 0)
925 {
926 SE.Play("keyitem");
927 Msg.Say("get_keyItem", EClass.sources.keyItems.map[id].GetName(), null, null, null);
928 return;
929 }
930 SE.Play("keyitem_lose");
931 Msg.Say("lose_keyItem", EClass.sources.keyItems.map[id].GetName(), null, null, null);
932 }
933 }
934
935 // Token: 0x06000518 RID: 1304 RVA: 0x000242E5 File Offset: 0x000224E5
936 public int CountKeyItem(string alias)
937 {
938 return this.CountKeyItem(EClass.sources.keyItems.alias[alias].id);
939 }
940
941 // Token: 0x06000519 RID: 1305 RVA: 0x00024307 File Offset: 0x00022507
942 public int CountKeyItem(int id)
943 {
944 if (!this.keyItems.ContainsKey(id))
945 {
946 return 0;
947 }
948 return this.keyItems[id];
949 }
950
951 // Token: 0x0600051A RID: 1306 RVA: 0x00024328 File Offset: 0x00022528
952 public void EquipTool(Thing a, bool setHotItem = true)
953 {
954 if (a.GetRootCard() != EClass.pc)
955 {
956 if (a.parent is Thing)
957 {
958 Msg.Say("movedToEquip", a, a.parent as Thing, null, null);
959 }
960 a = EClass.pc.AddThing(a, true, -1, -1);
961 }
962 if (setHotItem)
963 {
964 EClass.player.SetCurrentHotItem(a.trait.GetHotItem());
965 SE.SelectHotitem();
966 }
967 }
968
969 // Token: 0x0600051B RID: 1307 RVA: 0x00024398 File Offset: 0x00022598
970 public void RefreshCurrentHotItem()
971 {
972 WidgetCurrentTool instance = WidgetCurrentTool.Instance;
973 if (this.currentHotItem != null)
974 {
975 instance.buttonHotItem.Refresh();
976 if (this.currentHotItem is HotItemHeld && this.currentHotItem.Thing != EClass.pc.held)
977 {
978 this.currentHotItem = null;
979 }
980 else if (this.currentHotItem is HotItemThing && (this.currentHotItem.Thing == null || this.currentHotItem.Thing.GetRootCard() != EClass.pc))
981 {
982 this.currentHotItem = null;
983 }
984 }
985 if (EClass.pc.held != null)
986 {
987 this.currentHotItem = new HotItemHeld(EClass.pc.held as Thing);
988 }
989 if (this.currentHotItem == null)
990 {
991 if (instance.selected != -1 && instance.selectedButton.card != null && instance.selectedButton.card.GetRootCard() == EClass.pc)
992 {
993 this.currentHotItem = instance.selectedButton.card.trait.GetHotItem();
994 }
995 else
996 {
997 this.currentHotItem = this.hotItemNoItem;
998 }
999 }
1000 if (this.currentHotItem != this.lastHotItem)
1001 {
1002 if (this.lastHotItem != null)
1003 {
1004 this.lastHotItem.OnUnsetCurrentItem();
1005 }
1006 this.currentHotItem.OnSetCurrentItem();
1007 this.lastHotItem = this.currentHotItem;
1008 }
1009 WidgetCurrentTool.RefreshCurrentHotItem();
1010 WidgetHotbar.dirtyCurrentItem = false;
1011 this.MarkMapHighlights();
1012 EClass.core.actionsNextFrame.Add(delegate
1013 {
1014 EClass.core.actionsNextFrame.Add(delegate
1015 {
1016 foreach (LayerInventory layerInventory in LayerInventory.listInv)
1017 {
1018 layerInventory.invs[0].RefreshHighlight();
1019 }
1020 });
1021 });
1022 EClass.pc.RecalculateFOV();
1023 }
1024
1025 // Token: 0x0600051C RID: 1308 RVA: 0x00024528 File Offset: 0x00022728
1026 public void ResetCurrentHotItem()
1027 {
1028 EClass.pc.PickHeld(false);
1029 EClass.player.SetCurrentHotItem(null);
1030 SE.SelectHotitem();
1031 }
1032
1033 // Token: 0x0600051D RID: 1309 RVA: 0x00024548 File Offset: 0x00022748
1034 public void SetCurrentHotItem(HotItem item)
1035 {
1036 EClass.pc.PickHeld(false);
1037 if (this.currentHotItem != item)
1038 {
1039 this.currentHotItem = item;
1040 HotItemHeld hotItemHeld = this.currentHotItem as HotItemHeld;
1041 if (hotItemHeld != null)
1042 {
1043 EClass.pc.HoldCard(hotItemHeld.Thing, -1);
1044 }
1045 }
1046 this.RefreshCurrentHotItem();
1047 }
1048
1049 // Token: 0x0600051E RID: 1310 RVA: 0x00024598 File Offset: 0x00022798
1050 public Thing FindAmmo(Thing weapon)
1051 {
1052 TraitToolRange ranged = weapon.trait as TraitToolRange;
1053 Thing thing = EClass.pc.things.Find<TraitQuiver>();
1054 if (thing != null)
1055 {
1056 Thing thing2 = thing.things.Find((Thing t) => ranged.IsAmmo(t), true);
1057 if (thing2 != null)
1058 {
1059 return thing2;
1060 }
1061 }
1062 return EClass.pc.things.Find((Thing t) => ranged.IsAmmo(t), true);
1063 }
1064
1065 // Token: 0x0600051F RID: 1311 RVA: 0x0002460C File Offset: 0x0002280C
1066 public void TryEquipBait()
1067 {
1068 if (this.eqBait != null && this.eqBait.GetRootCard() != EClass.pc)
1069 {
1070 this.eqBait = null;
1071 }
1072 if (this.eqBait == null)
1073 {
1074 Thing thing = EClass.pc.things.Find<TraitBait>();
1075 if (thing != null)
1076 {
1077 thing.trait.OnUse(EClass.pc);
1078 }
1079 }
1080 }
1081
1082 // Token: 0x06000520 RID: 1312 RVA: 0x00024666 File Offset: 0x00022866
1083 public bool HasValidRangedTarget()
1084 {
1085 return this.target != null && this.target.IsAliveInCurrentZone && this.target.isSynced && EClass.pc.CanSee(this.target);
1086 }
1087
1088 // Token: 0x06000521 RID: 1313 RVA: 0x000246A0 File Offset: 0x000228A0
1089 public bool TargetRanged()
1090 {
1091 Thing thing = EClass.player.currentHotItem.Thing;
1092 if (thing != null)
1093 {
1094 Trait trait = thing.trait;
1095 }
1096 int num = 999999999;
1097 Chara chara = null;
1098 Point pos = EClass.scene.mouseTarget.pos;
1099 List<Chara> list = new List<Chara>();
1100 bool flag = false;
1101 if (EInput.isShiftDown && pos.IsValid && pos.HasChara)
1102 {
1103 foreach (Chara chara2 in EClass._map.charas)
1104 {
1105 if (chara2.isSynced && chara2.IsAliveInCurrentZone && !chara2.IsPC && chara2.pos.Equals(pos) && EClass.pc.CanSeeLos(chara2.pos, -1))
1106 {
1107 list.Add(chara2);
1108 }
1109 }
1110 if (list.Count > 0)
1111 {
1112 chara = list.NextItem(EClass.player.target);
1113 flag = true;
1114 }
1115 list.Clear();
1116 }
1117 if (!flag)
1118 {
1119 foreach (Chara chara3 in EClass._map.charas)
1120 {
1121 int num2 = 0;
1122 if (chara3.isSynced && chara3.IsAliveInCurrentZone && !chara3.IsPC && EClass.pc.CanSeeLos(chara3.pos, -1) && EClass.pc.CanSee(chara3) && !chara3.IsFriendOrAbove())
1123 {
1124 if (chara3.IsNeutralOrAbove())
1125 {
1126 num2 += 10000;
1127 }
1128 num2 += EClass.pc.Dist(chara3);
1129 if (num2 < num)
1130 {
1131 chara = chara3;
1132 num = num2;
1133 }
1134 list.Add(chara3);
1135 }
1136 }
1137 if (EInput.isShiftDown)
1138 {
1139 chara = list.NextItem(EClass.player.target);
1140 }
1141 }
1142 if (chara == null)
1143 {
1144 if (this.target != null)
1145 {
1146 Msg.Say("noTargetFound");
1147 }
1148 this.target = null;
1149 return false;
1150 }
1151 if (this.target != chara)
1152 {
1153 Msg.Say("targetSet", chara, null, null, null);
1154 }
1155 this.target = chara;
1156 return true;
1157 }
1158
1159 // Token: 0x06000522 RID: 1314 RVA: 0x000248DC File Offset: 0x00022ADC
1160 public void OnAdvanceHour()
1161 {
1162 EClass.pc.faith.OnChangeHour();
1163 if (EClass.pc.Evalue(289) > 0)
1164 {
1165 foreach (Thing t2 in EClass.pc.things.List((Thing t) => t.c_IDTState == 5, true))
1166 {
1167 EClass.pc.TryIdentify(t2, 1, true);
1168 }
1169 }
1170 if (!EClass.pc.IsDeadOrSleeping && EClass.rnd(2) == 0 && !EClass._zone.IsRegion)
1171 {
1172 foreach (Chara chara in EClass.pc.party.members)
1173 {
1174 chara.AddExp(1);
1175 }
1176 }
1177 }
1178
1179 // Token: 0x06000523 RID: 1315 RVA: 0x000249EC File Offset: 0x00022BEC
1180 public void OnAdvanceDay()
1181 {
1182 this.nums.OnAdvanceDay();
1183 Chara pc = EClass.pc;
1184 int c_daysWithGod = pc.c_daysWithGod;
1185 pc.c_daysWithGod = c_daysWithGod + 1;
1186 if (EClass.pc.Evalue(85) > 0)
1187 {
1188 EClass.pc.ModExp(85, 10);
1189 }
1190 EClass.pc.RefreshFaithElement();
1191 this.prayed = false;
1192 if (this.karma < 0 && EClass.rnd(4) == 0)
1193 {
1194 this.ModKarma(1);
1195 }
1196 }
1197
1198 // Token: 0x06000524 RID: 1316 RVA: 0x00024A5E File Offset: 0x00022C5E
1199 public bool TryAbortAutoCombat()
1200 {
1201 if (!(EClass.pc.ai is GoalAutoCombat))
1202 {
1203 return false;
1204 }
1205 EClass.pc.ai.Cancel();
1206 EClass.pc.SetNoGoal();
1207 return true;
1208 }
1209
1210 // Token: 0x06000525 RID: 1317 RVA: 0x00024A90 File Offset: 0x00022C90
1211 public void ClearMapHighlights()
1212 {
1213 foreach (Point point in this.lastMarkedHighlights)
1214 {
1215 point.cell.highlight = 0;
1216 }
1217 this.lastMarkedHighlights.Clear();
1218 }
1219
1220 // Token: 0x06000526 RID: 1318 RVA: 0x00024AF4 File Offset: 0x00022CF4
1221 public void MarkMapHighlights()
1222 {
1223 this.ClearMapHighlights();
1224 if (EClass.game.config.highlightAct)
1225 {
1226 this.currentHotItem.OnMarkMapHighlights();
1227 }
1228 }
1229
1230 // Token: 0x06000527 RID: 1319 RVA: 0x00024B18 File Offset: 0x00022D18
1231 public bool CanAcceptInput()
1232 {
1233 return EClass.pc.HasNoGoal && !EClass.pc.WillConsumeTurn();
1234 }
1235
1236 // Token: 0x06000528 RID: 1320 RVA: 0x00024B38 File Offset: 0x00022D38
1237 public bool CanSee(Chara c)
1238 {
1239 if (EClass.pc.hasTelepathy && c.race.visibleWithTelepathy)
1240 {
1241 return true;
1242 }
1243 if (!c.IsPC && (EClass.pc.fov == null || EClass.pc.isBlind))
1244 {
1245 return false;
1246 }
1247 if (c.IsPCParty || c.isDead)
1248 {
1249 return true;
1250 }
1251 if (c.IsMultisize)
1252 {
1253 bool canSee = false;
1254 int dist = EClass.pc.Dist(c);
1255 c.ForeachPoint(delegate(Point p, bool main)
1256 {
1257 if (!canSee && (p.cell.light > 0 || dist < 2) && p.cell.pcSync)
1258 {
1259 canSee = true;
1260 }
1261 });
1262 return canSee;
1263 }
1264 return (c.pos.cell.light > 0 || EClass.pc.Dist(c) < 2) && c.pos.cell.pcSync;
1265 }
1266
1267 // Token: 0x06000529 RID: 1321 RVA: 0x00024C08 File Offset: 0x00022E08
1268 public void AddExpKnowledge(int a)
1269 {
1270 this.expKnowledge += a;
1271 if (this.expKnowledge >= this.MaxExpKnowledge)
1272 {
1273 for (int i = 0; i < this.expKnowledge / this.MaxExpKnowledge; i++)
1274 {
1275 Player.<AddExpKnowledge>g__LvUp|201_0();
1276 }
1277 this.expKnowledge %= this.MaxExpKnowledge;
1278 }
1279 }
1280
1281 // Token: 0x0600052A RID: 1322 RVA: 0x00024C64 File Offset: 0x00022E64
1282 public void AddExpInfluence(int a)
1283 {
1284 this.expInfluence += a;
1285 if (this.expInfluence >= this.MaxExpInfluence)
1286 {
1287 for (int i = 0; i < this.expInfluence / this.MaxExpInfluence; i++)
1288 {
1289 Player.<AddExpInfluence>g__LvUp|202_0();
1290 }
1291 this.expInfluence %= this.MaxExpInfluence;
1292 }
1293 }
1294
1295 // Token: 0x0600052B RID: 1323 RVA: 0x00024CC0 File Offset: 0x00022EC0
1296 public void ModKarma(int a)
1297 {
1298 if (a == 0)
1299 {
1300 return;
1301 }
1302 if (a < 0)
1303 {
1304 Tutorial.Reserve("karma", null);
1305 }
1306 bool flag = this.karma < 0;
1307 this.karma += a;
1308 Msg.Say((a > 0) ? "karmaUp" : "karmaDown", a.ToString() ?? "", null, null, null);
1309 if (this.karma < 0 && !flag)
1310 {
1311 Msg.Say("becomeCriminal");
1312 EClass.pc.pos.TryWitnessCrime(EClass.pc, null, 4, null);
1313 EClass._zone.RefreshCriminal();
1314 Tutorial.Reserve("criminal", null);
1315 }
1316 if (this.karma >= 0 && flag)
1317 {
1318 Msg.Say("becomeNonCriminal");
1319 EClass._zone.RefreshCriminal();
1320 }
1321 EClass.game.quests.list.ForeachReverse(delegate(Quest q)
1322 {
1323 q.OnModKarma(a);
1324 });
1325 this.karma = Mathf.Clamp(this.karma, -100, 100);
1326 }
1327
1328 // Token: 0x0600052C RID: 1324 RVA: 0x00024DE4 File Offset: 0x00022FE4
1329 public Thing DropReward(Thing t, bool silent = false)
1330 {
1331 t.things.DestroyAll(null);
1332 EClass._zone.AddCard(t, EClass.pc.pos);
1333 if (!silent)
1334 {
1335 Msg.Say("dropReward");
1336 }
1337 return t;
1338 }
1339
1340 // Token: 0x0600052D RID: 1325 RVA: 0x00024E18 File Offset: 0x00023018
1341 public bool TooHeavyToMove()
1342 {
1343 if (!EClass.debug.ignoreWeight && EClass.pc.burden.GetPhase() == 4)
1344 {
1345 Msg.Say("tooHeavyToMove");
1346 EClass.pc.renderer.NextFrame();
1347 EInput.Consume(true, 1);
1348 return true;
1349 }
1350 return false;
1351 }
1352
1353 // Token: 0x0600052F RID: 1327 RVA: 0x0002500E File Offset: 0x0002320E
1354 [CompilerGenerated]
1355 internal static Thing <CreateEquip>g__SetSpellbook|170_0(Thing t, int charge)
1356 {
1357 t.AddEditorTag(EditorTag.NoReadFail);
1358 t.c_charges = charge;
1359 t.SetBlessedState(BlessedState.Normal);
1360 return t;
1361 }
1362
1363 // Token: 0x06000530 RID: 1328 RVA: 0x0002502A File Offset: 0x0002322A
1364 [CompilerGenerated]
1365 internal static void <AddExpKnowledge>g__LvUp|201_0()
1366 {
1367 Msg.Say("DingKnowledge");
1368 }
1369
1370 // Token: 0x06000531 RID: 1329 RVA: 0x00025037 File Offset: 0x00023237
1371 [CompilerGenerated]
1372 internal static void <AddExpInfluence>g__LvUp|202_0()
1373 {
1374 Msg.Say("DingInfluence");
1375 }
1376
1377 // Token: 0x04000661 RID: 1633
1378 [JsonProperty]
1379 public Player.ReturnInfo returnInfo;
1380
1381 // Token: 0x04000662 RID: 1634
1382 [JsonProperty]
1383 public int uidChara;
1384
1385 // Token: 0x04000663 RID: 1635
1386 [JsonProperty]
1387 public int uidSpawnZone;
1388
1389 // Token: 0x04000664 RID: 1636
1390 [JsonProperty]
1391 public int tutorialStep;
1392
1393 // Token: 0x04000665 RID: 1637
1394 [JsonProperty]
1395 public int karma;
1396
1397 // Token: 0x04000666 RID: 1638
1398 [JsonProperty]
1399 public int fame;
1400
1401 // Token: 0x04000667 RID: 1639
1402 [JsonProperty]
1403 public int expKnowledge;
1404
1405 // Token: 0x04000668 RID: 1640
1406 [JsonProperty]
1407 public int expInfluence;
1408
1409 // Token: 0x04000669 RID: 1641
1410 [JsonProperty]
1411 public int dateTravel;
1412
1413 // Token: 0x0400066A RID: 1642
1414 [JsonProperty]
1415 public int distanceTravel;
1416
1417 // Token: 0x0400066B RID: 1643
1418 [JsonProperty]
1419 public int uidLastTravelZone;
1420
1421 // Token: 0x0400066C RID: 1644
1422 [JsonProperty]
1423 public int uidLastZone;
1424
1425 // Token: 0x0400066D RID: 1645
1426 [JsonProperty]
1427 public int uidLastShippedZone;
1428
1429 // Token: 0x0400066E RID: 1646
1430 [JsonProperty]
1431 public int totalFeat;
1432
1433 // Token: 0x0400066F RID: 1647
1434 [JsonProperty]
1435 public int taxBills;
1436
1437 // Token: 0x04000670 RID: 1648
1438 [JsonProperty]
1439 public int unpaidBill;
1440
1441 // Token: 0x04000671 RID: 1649
1442 [JsonProperty]
1443 public int bankMoney;
1444
1445 // Token: 0x04000672 RID: 1650
1446 [JsonProperty]
1447 public int holyWell;
1448
1449 // Token: 0x04000673 RID: 1651
1450 [JsonProperty]
1451 public int safeTravel;
1452
1453 // Token: 0x04000674 RID: 1652
1454 [JsonProperty]
1455 public int hotbarPage;
1456
1457 // Token: 0x04000675 RID: 1653
1458 [JsonProperty]
1459 public int little_dead;
1460
1461 // Token: 0x04000676 RID: 1654
1462 [JsonProperty]
1463 public int little_saved;
1464
1465 // Token: 0x04000677 RID: 1655
1466 [JsonProperty]
1467 public int extraTax;
1468
1469 // Token: 0x04000678 RID: 1656
1470 [JsonProperty]
1471 public int lastFelmeraReward;
1472
1473 // Token: 0x04000679 RID: 1657
1474 [JsonProperty]
1475 public int uidLastTown;
1476
1477 // Token: 0x0400067A RID: 1658
1478 [JsonProperty]
1479 public int seedShrine;
1480
1481 // Token: 0x0400067B RID: 1659
1482 [JsonProperty]
1483 public int seedChest;
1484
1485 // Token: 0x0400067C RID: 1660
1486 [JsonProperty]
1487 public int debt;
1488
1489 // Token: 0x0400067D RID: 1661
1490 [JsonProperty]
1491 public float angle;
1492
1493 // Token: 0x0400067E RID: 1662
1494 [JsonProperty]
1495 public bool hasNewQuest;
1496
1497 // Token: 0x0400067F RID: 1663
1498 [JsonProperty]
1499 public bool dailyGacha;
1500
1501 // Token: 0x04000680 RID: 1664
1502 [JsonProperty]
1503 public bool useSubWidgetTheme;
1504
1505 // Token: 0x04000681 RID: 1665
1506 [JsonProperty]
1507 public bool wellWished;
1508
1509 // Token: 0x04000682 RID: 1666
1510 [JsonProperty]
1511 public bool prayed;
1512
1513 // Token: 0x04000683 RID: 1667
1514 [JsonProperty]
1515 public bool questTracker;
1516
1517 // Token: 0x04000684 RID: 1668
1518 [JsonProperty]
1519 public bool showShippingResult;
1520
1521 // Token: 0x04000685 RID: 1669
1522 [JsonProperty]
1523 public bool isEditor;
1524
1525 // Token: 0x04000686 RID: 1670
1526 [JsonProperty]
1527 public string title;
1528
1529 // Token: 0x04000687 RID: 1671
1530 [JsonProperty]
1531 public string memo = "";
1532
1533 // Token: 0x04000688 RID: 1672
1534 [JsonProperty]
1535 public Player.Pref pref = new Player.Pref();
1536
1537 // Token: 0x04000689 RID: 1673
1538 [JsonProperty]
1539 public Player.Stats stats = new Player.Stats();
1540
1541 // Token: 0x0400068A RID: 1674
1542 [JsonProperty]
1543 public NumLogManager nums = new NumLogManager();
1544
1545 // Token: 0x0400068B RID: 1675
1546 [JsonProperty]
1547 public KnowledgeManager knowledges = new KnowledgeManager();
1548
1549 // Token: 0x0400068C RID: 1676
1550 [JsonProperty]
1551 public PopupManager popups = new PopupManager();
1552
1553 // Token: 0x0400068D RID: 1677
1554 [JsonProperty]
1555 public WidgetManager.SaveData mainWidgets;
1556
1557 // Token: 0x0400068E RID: 1678
1558 [JsonProperty]
1559 public WidgetManager.SaveData subWidgets;
1560
1561 // Token: 0x0400068F RID: 1679
1562 [JsonProperty]
1563 public LayerAbility.Config layerAbilityConfig = new LayerAbility.Config();
1564
1565 // Token: 0x04000690 RID: 1680
1566 [JsonProperty]
1567 public Dictionary<string, int> dialogFlags = new Dictionary<string, int>();
1568
1569 // Token: 0x04000691 RID: 1681
1570 [JsonProperty]
1571 public Dictionary<string, string> hangIcons = new Dictionary<string, string>();
1572
1573 // Token: 0x04000692 RID: 1682
1574 [JsonProperty]
1575 public Dictionary<string, KnownSong> knownSongs = new Dictionary<string, KnownSong>();
1576
1577 // Token: 0x04000693 RID: 1683
1578 [JsonProperty]
1579 public HashSet<string> trackedCategories = new HashSet<string>();
1580
1581 // Token: 0x04000694 RID: 1684
1582 [JsonProperty]
1583 public HashSet<string> trackedCards = new HashSet<string>();
1584
1585 // Token: 0x04000695 RID: 1685
1586 [JsonProperty]
1587 public HashSet<int> trackedElements = new HashSet<int>();
1588
1589 // Token: 0x04000696 RID: 1686
1590 [JsonProperty]
1591 public HashSet<int> knownBGMs = new HashSet<int>();
1592
1593 // Token: 0x04000697 RID: 1687
1594 [JsonProperty]
1595 public HashSet<int> favAbility = new HashSet<int>();
1596
1597 // Token: 0x04000698 RID: 1688
1598 [JsonProperty]
1599 public HashSet<int> sketches = new HashSet<int>();
1600
1601 // Token: 0x04000699 RID: 1689
1602 [JsonProperty]
1603 public HashSet<int> doneBackers = new HashSet<int>();
1604
1605 // Token: 0x0400069A RID: 1690
1606 [JsonProperty]
1607 public HashSet<int> knownCraft = new HashSet<int>();
1608
1609 // Token: 0x0400069B RID: 1691
1610 [JsonProperty]
1611 public List<int> domains = new List<int>();
1612
1613 // Token: 0x0400069C RID: 1692
1614 [JsonProperty]
1615 public Zone zone;
1616
1617 // Token: 0x0400069D RID: 1693
1618 [JsonProperty]
1619 public HotbarManager hotbars = new HotbarManager();
1620
1621 // Token: 0x0400069E RID: 1694
1622 [JsonProperty]
1623 public Chara _agent;
1624
1625 // Token: 0x0400069F RID: 1695
1626 [JsonProperty]
1627 public Hoard hoard = new Hoard();
1628
1629 // Token: 0x040006A0 RID: 1696
1630 [JsonProperty]
1631 public Player.Flags flags = new Player.Flags();
1632
1633 // Token: 0x040006A1 RID: 1697
1634 [JsonProperty]
1635 public RecipeManager recipes = new RecipeManager();
1636
1637 // Token: 0x040006A2 RID: 1698
1638 [JsonProperty]
1639 public HotItem currentHotItem = new HotItemNoItem();
1640
1641 // Token: 0x040006A3 RID: 1699
1642 [JsonProperty]
1643 public Point lastZonePos;
1644
1645 // Token: 0x040006A4 RID: 1700
1646 [JsonProperty]
1647 public Thing eqBait;
1648
1649 // Token: 0x040006A5 RID: 1701
1650 [JsonProperty]
1651 public Dictionary<string, Window.SaveData> dataWindow;
1652
1653 // Token: 0x040006A6 RID: 1702
1654 [JsonProperty]
1655 public CinemaConfig cinemaConfig = new CinemaConfig();
1656
1657 // Token: 0x040006A7 RID: 1703
1658 [JsonProperty]
1659 public CodexManager codex = new CodexManager();
1660
1661 // Token: 0x040006A8 RID: 1704
1662 [JsonProperty]
1663 public Dictionary<int, int> keyItems = new Dictionary<int, int>();
1664
1665 // Token: 0x040006A9 RID: 1705
1666 [JsonProperty]
1667 public List<int> uidPickOnLoad = new List<int>();
1668
1669 // Token: 0x040006AA RID: 1706
1670 [JsonProperty]
1671 public List<ShippingResult> shippingResults = new List<ShippingResult>();
1672
1673 // Token: 0x040006AB RID: 1707
1674 [JsonProperty]
1675 public Dictionary<string, HashSet<string>> noRestocks = new Dictionary<string, HashSet<string>>();
1676
1677 // Token: 0x040006AC RID: 1708
1678 [JsonProperty]
1679 public Window.SaveData windowAllyInv;
1680
1681 // Token: 0x040006AD RID: 1709
1682 public static int seedHallucination;
1683
1684 // Token: 0x040006AE RID: 1710
1685 public static int realHour;
1686
1687 // Token: 0x040006AF RID: 1711
1688 public ZoneTransition lastTransition;
1689
1690 // Token: 0x040006B0 RID: 1712
1691 public List<Point> lastMarkedHighlights = new List<Point>();
1692
1693 // Token: 0x040006B1 RID: 1713
1694 public HotItem lastHotItem;
1695
1696 // Token: 0x040006B2 RID: 1714
1697 public HotItem hotItemToRestore;
1698
1699 // Token: 0x040006B3 RID: 1715
1700 public bool forceTalk;
1701
1702 // Token: 0x040006B4 RID: 1716
1703 public bool altHeldPos;
1704
1705 // Token: 0x040006B5 RID: 1717
1706 public bool instaComplete = true;
1707
1708 // Token: 0x040006B6 RID: 1718
1709 public bool regionMoveWarned;
1710
1711 // Token: 0x040006B7 RID: 1719
1712 public bool waitingInput;
1713
1714 // Token: 0x040006B8 RID: 1720
1715 public bool willEndTurn;
1716
1717 // Token: 0x040006B9 RID: 1721
1718 public bool wasDirtyWeight;
1719
1720 // Token: 0x040006BA RID: 1722
1721 public bool deathDialog;
1722
1723 // Token: 0x040006BB RID: 1723
1724 public bool preventDeathPenalty;
1725
1726 // Token: 0x040006BC RID: 1724
1727 public bool deathZoneMove;
1728
1729 // Token: 0x040006BD RID: 1725
1730 public bool haltMove;
1731
1732 // Token: 0x040006BE RID: 1726
1733 public bool invlunerable;
1734
1735 // Token: 0x040006BF RID: 1727
1736 public bool willAutoSave;
1737
1738 // Token: 0x040006C0 RID: 1728
1739 public bool simulatingZone;
1740
1741 // Token: 0x040006C1 RID: 1729
1742 public bool isAutoFarming;
1743
1744 // Token: 0x040006C2 RID: 1730
1745 public bool enemySpotted;
1746
1747 // Token: 0x040006C3 RID: 1731
1748 public string deathMsg;
1749
1750 // Token: 0x040006C4 RID: 1732
1751 public int countNewline;
1752
1753 // Token: 0x040006C5 RID: 1733
1754 public int lightRadius;
1755
1756 // Token: 0x040006C6 RID: 1734
1757 public int lastTurn;
1758
1759 // Token: 0x040006C7 RID: 1735
1760 public int lastEmptyAlly;
1761
1762 // Token: 0x040006C8 RID: 1736
1763 public float lightPower;
1764
1765 // Token: 0x040006C9 RID: 1737
1766 public float baseActTime;
1767
1768 // Token: 0x040006CA RID: 1738
1769 public float pickupDelay = 2f;
1770
1771 // Token: 0x040006CB RID: 1739
1772 public Chara chara;
1773
1774 // Token: 0x040006CC RID: 1740
1775 public Chara focusedchara;
1776
1777 // Token: 0x040006CD RID: 1741
1778 public NoticeManager notices = new NoticeManager();
1779
1780 // Token: 0x040006CE RID: 1742
1781 public QueueManager queues = new QueueManager();
1782
1783 // Token: 0x040006CF RID: 1743
1784 public Act lastAct;
1785
1786 // Token: 0x040006D0 RID: 1744
1787 public Vector2 nextMove;
1788
1789 // Token: 0x040006D1 RID: 1745
1790 public Vector3 position;
1791
1792 // Token: 0x040006D2 RID: 1746
1793 public Action onStartZone;
1794
1795 // Token: 0x040006D3 RID: 1747
1796 public PlayingSong playingSong;
1797
1798 // Token: 0x040006D4 RID: 1748
1799 public List<Chara> listSummon = new List<Chara>();
1800
1801 // Token: 0x040006D5 RID: 1749
1802 public int tempFame;
1803
1804 // Token: 0x040006D6 RID: 1750
1805 public int autoCombatStartHP;
1806
1807 // Token: 0x040006D7 RID: 1751
1808 public Zone nextZone;
1809
1810 // Token: 0x040006D8 RID: 1752
1811 public Thing renderThing;
1812
1813 // Token: 0x040006D9 RID: 1753
1814 public HotItemNoItem hotItemNoItem = new HotItemNoItem();
1815
1816 // Token: 0x040006DA RID: 1754
1817 public Chara target;
1818
1819 // Token: 0x02000809 RID: 2057
1820 public class ReturnInfo
1821 {
1822 // Token: 0x04002298 RID: 8856
1823 public int turns;
1824
1825 // Token: 0x04002299 RID: 8857
1826 public int uidDest;
1827
1828 // Token: 0x0400229A RID: 8858
1829 public bool isEvac;
1830
1831 // Token: 0x0400229B RID: 8859
1832 public bool askDest;
1833 }
1834
1835 // Token: 0x0200080A RID: 2058
1836 public class Pref
1837 {
1838 // Token: 0x0400229C RID: 8860
1839 [JsonIgnore]
1840 public string lastBuildCategory;
1841
1842 // Token: 0x0400229D RID: 8861
1843 [JsonIgnore]
1844 public string lastBuildRecipe;
1845
1846 // Token: 0x0400229E RID: 8862
1847 public int lastIdTabAbility;
1848
1849 // Token: 0x0400229F RID: 8863
1850 public bool layerInventory;
1851
1852 // Token: 0x040022A0 RID: 8864
1853 public bool layerAbility;
1854
1855 // Token: 0x040022A1 RID: 8865
1856 public bool layerCraft;
1857
1858 // Token: 0x040022A2 RID: 8866
1859 public bool sort_ascending;
1860
1861 // Token: 0x040022A3 RID: 8867
1862 public bool sort_ascending_shop;
1863
1864 // Token: 0x040022A4 RID: 8868
1865 public UIList.SortMode sortResources;
1866
1867 // Token: 0x040022A5 RID: 8869
1868 public UIList.SortMode sortPeople;
1869
1870 // Token: 0x040022A6 RID: 8870
1871 public UIList.SortMode sortResearch = UIList.SortMode.ByCategory;
1872
1873 // Token: 0x040022A7 RID: 8871
1874 public UIList.SortMode sortInv = UIList.SortMode.ByCategory;
1875
1876 // Token: 0x040022A8 RID: 8872
1877 public UIList.SortMode sortInvShop = UIList.SortMode.ByValue;
1878
1879 // Token: 0x040022A9 RID: 8873
1880 public UIList.SortMode sortAbility = UIList.SortMode.ByID;
1881
1882 // Token: 0x040022AA RID: 8874
1883 public LayerPeople.ShowMode modePoeple;
1884
1885 // Token: 0x040022AB RID: 8875
1886 public UIInventory.InteractMode interactMode;
1887 }
1888
1889 // Token: 0x0200080B RID: 2059
1890 public class Stats
1891 {
1892 // Token: 0x06003864 RID: 14436 RVA: 0x0012E250 File Offset: 0x0012C450
1893 public int GetShippingBonus(int _a)
1894 {
1895 Player.Stats.<>c__DisplayClass21_0 CS$<>8__locals1;
1896 CS$<>8__locals1.<>4__this = this;
1897 CS$<>8__locals1.p = 0;
1898 CS$<>8__locals1.a = _a;
1899 CS$<>8__locals1.first = true;
1900 this.<GetShippingBonus>g__SetBonus|21_0(500000, 5000, ref CS$<>8__locals1);
1901 this.<GetShippingBonus>g__SetBonus|21_0(250000, 3000, ref CS$<>8__locals1);
1902 this.<GetShippingBonus>g__SetBonus|21_0(100000, 2000, ref CS$<>8__locals1);
1903 this.<GetShippingBonus>g__SetBonus|21_0(20000, 1000, ref CS$<>8__locals1);
1904 this.<GetShippingBonus>g__SetBonus|21_0(6000, 500, ref CS$<>8__locals1);
1905 this.<GetShippingBonus>g__SetBonus|21_0(2000, 200, ref CS$<>8__locals1);
1906 this.<GetShippingBonus>g__SetBonus|21_0(0, 100, ref CS$<>8__locals1);
1907 return CS$<>8__locals1.p;
1908 }
1909
1910 // Token: 0x06003866 RID: 14438 RVA: 0x0012E304 File Offset: 0x0012C504
1911 [CompilerGenerated]
1912 private void <GetShippingBonus>g__SetBonus|21_0(int threshold, int div, ref Player.Stats.<>c__DisplayClass21_0 A_3)
1913 {
1914 if (A_3.a >= threshold)
1915 {
1916 A_3.p += (A_3.a - threshold) / div;
1917 if (A_3.first)
1918 {
1919 this.lastShippingExp = (A_3.a - threshold) % div;
1920 this.lastShippingExpMax = div;
1921 A_3.first = false;
1922 }
1923 A_3.a = threshold;
1924 }
1925 }
1926
1927 // Token: 0x040022AC RID: 8876
1928 public double timeElapsed;
1929
1930 // Token: 0x040022AD RID: 8877
1931 public int kumi;
1932
1933 // Token: 0x040022AE RID: 8878
1934 public int mins;
1935
1936 // Token: 0x040022AF RID: 8879
1937 public int days;
1938
1939 // Token: 0x040022B0 RID: 8880
1940 public int months;
1941
1942 // Token: 0x040022B1 RID: 8881
1943 public int sieges;
1944
1945 // Token: 0x040022B2 RID: 8882
1946 public int turns;
1947
1948 // Token: 0x040022B3 RID: 8883
1949 public int kills;
1950
1951 // Token: 0x040022B4 RID: 8884
1952 public int taxBills;
1953
1954 // Token: 0x040022B5 RID: 8885
1955 public int taxBillsPaid;
1956
1957 // Token: 0x040022B6 RID: 8886
1958 public int digs;
1959
1960 // Token: 0x040022B7 RID: 8887
1961 public int shipNum;
1962
1963 // Token: 0x040022B8 RID: 8888
1964 public int shipMoney;
1965
1966 // Token: 0x040022B9 RID: 8889
1967 public int slept;
1968
1969 // Token: 0x040022BA RID: 8890
1970 public int death;
1971
1972 // Token: 0x040022BB RID: 8891
1973 public int allyDeath;
1974
1975 // Token: 0x040022BC RID: 8892
1976 public int deepest;
1977
1978 // Token: 0x040022BD RID: 8893
1979 public int gambleChest;
1980
1981 // Token: 0x040022BE RID: 8894
1982 public int gambleChestOpen;
1983
1984 // Token: 0x040022BF RID: 8895
1985 [JsonIgnore]
1986 public int lastShippingExp;
1987
1988 // Token: 0x040022C0 RID: 8896
1989 [JsonIgnore]
1990 public int lastShippingExpMax;
1991 }
1992
1993 // Token: 0x0200080C RID: 2060
1994 public class Flags : EClass
1995 {
1996 // Token: 0x1700112A RID: 4394
1997 // (get) Token: 0x06003867 RID: 14439 RVA: 0x0012E35E File Offset: 0x0012C55E
1998 // (set) Token: 0x06003868 RID: 14440 RVA: 0x0012E36C File Offset: 0x0012C56C
1999 public bool gotClickReward
2000 {
2001 get
2002 {
2003 return this.bits[1];
2004 }
2005 set
2006 {
2007 this.bits[1] = value;
2008 }
2009 }
2010
2011 // Token: 0x1700112B RID: 4395
2012 // (get) Token: 0x06003869 RID: 14441 RVA: 0x0012E37B File Offset: 0x0012C57B
2013 // (set) Token: 0x0600386A RID: 14442 RVA: 0x0012E389 File Offset: 0x0012C589
2014 public bool welcome
2015 {
2016 get
2017 {
2018 return this.bits[2];
2019 }
2020 set
2021 {
2022 this.bits[2] = value;
2023 }
2024 }
2025
2026 // Token: 0x1700112C RID: 4396
2027 // (get) Token: 0x0600386B RID: 14443 RVA: 0x0012E398 File Offset: 0x0012C598
2028 // (set) Token: 0x0600386C RID: 14444 RVA: 0x0012E3A6 File Offset: 0x0012C5A6
2029 public bool fiamaStoryBookGiven
2030 {
2031 get
2032 {
2033 return this.bits[3];
2034 }
2035 set
2036 {
2037 this.bits[3] = value;
2038 }
2039 }
2040
2041 // Token: 0x1700112D RID: 4397
2042 // (get) Token: 0x0600386D RID: 14445 RVA: 0x0012E3B5 File Offset: 0x0012C5B5
2043 // (set) Token: 0x0600386E RID: 14446 RVA: 0x0012E3C3 File Offset: 0x0012C5C3
2044 public bool fiamaFirstDream
2045 {
2046 get
2047 {
2048 return this.bits[4];
2049 }
2050 set
2051 {
2052 this.bits[4] = value;
2053 }
2054 }
2055
2056 // Token: 0x1700112E RID: 4398
2057 // (get) Token: 0x0600386F RID: 14447 RVA: 0x0012E3D2 File Offset: 0x0012C5D2
2058 // (set) Token: 0x06003870 RID: 14448 RVA: 0x0012E3E0 File Offset: 0x0012C5E0
2059 public bool helpHighlightDisabled
2060 {
2061 get
2062 {
2063 return this.bits[5];
2064 }
2065 set
2066 {
2067 this.bits[5] = value;
2068 }
2069 }
2070
2071 // Token: 0x1700112F RID: 4399
2072 // (get) Token: 0x06003871 RID: 14449 RVA: 0x0012E3EF File Offset: 0x0012C5EF
2073 // (set) Token: 0x06003872 RID: 14450 RVA: 0x0012E3FD File Offset: 0x0012C5FD
2074 public bool pickedMelilithTreasure
2075 {
2076 get
2077 {
2078 return this.bits[6];
2079 }
2080 set
2081 {
2082 this.bits[6] = value;
2083 }
2084 }
2085
2086 // Token: 0x17001130 RID: 4400
2087 // (get) Token: 0x06003873 RID: 14451 RVA: 0x0012E40C File Offset: 0x0012C60C
2088 // (set) Token: 0x06003874 RID: 14452 RVA: 0x0012E41A File Offset: 0x0012C61A
2089 public bool isShoesOff
2090 {
2091 get
2092 {
2093 return this.bits[7];
2094 }
2095 set
2096 {
2097 this.bits[7] = value;
2098 }
2099 }
2100
2101 // Token: 0x17001131 RID: 4401
2102 // (get) Token: 0x06003875 RID: 14453 RVA: 0x0012E429 File Offset: 0x0012C629
2103 // (set) Token: 0x06003876 RID: 14454 RVA: 0x0012E437 File Offset: 0x0012C637
2104 public bool backpackHighlightDisabled
2105 {
2106 get
2107 {
2108 return this.bits[8];
2109 }
2110 set
2111 {
2112 this.bits[8] = value;
2113 }
2114 }
2115
2116 // Token: 0x17001132 RID: 4402
2117 // (get) Token: 0x06003877 RID: 14455 RVA: 0x0012E446 File Offset: 0x0012C646
2118 // (set) Token: 0x06003878 RID: 14456 RVA: 0x0012E455 File Offset: 0x0012C655
2119 public bool abilityHighlightDisabled
2120 {
2121 get
2122 {
2123 return this.bits[9];
2124 }
2125 set
2126 {
2127 this.bits[9] = value;
2128 }
2129 }
2130
2131 // Token: 0x17001133 RID: 4403
2132 // (get) Token: 0x06003879 RID: 14457 RVA: 0x0012E465 File Offset: 0x0012C665
2133 // (set) Token: 0x0600387A RID: 14458 RVA: 0x0012E474 File Offset: 0x0012C674
2134 public bool elinGift
2135 {
2136 get
2137 {
2138 return this.bits[10];
2139 }
2140 set
2141 {
2142 this.bits[10] = value;
2143 }
2144 }
2145
2146 // Token: 0x17001134 RID: 4404
2147 // (get) Token: 0x0600387B RID: 14459 RVA: 0x0012E484 File Offset: 0x0012C684
2148 // (set) Token: 0x0600387C RID: 14460 RVA: 0x0012E493 File Offset: 0x0012C693
2149 public bool gotMelilithCurse
2150 {
2151 get
2152 {
2153 return this.bits[11];
2154 }
2155 set
2156 {
2157 this.bits[11] = value;
2158 }
2159 }
2160
2161 // Token: 0x17001135 RID: 4405
2162 // (get) Token: 0x0600387D RID: 14461 RVA: 0x0012E4A3 File Offset: 0x0012C6A3
2163 // (set) Token: 0x0600387E RID: 14462 RVA: 0x0012E4B2 File Offset: 0x0012C6B2
2164 public bool canComupWithFoodRecipe
2165 {
2166 get
2167 {
2168 return this.bits[12];
2169 }
2170 set
2171 {
2172 this.bits[12] = value;
2173 }
2174 }
2175
2176 // Token: 0x17001136 RID: 4406
2177 // (get) Token: 0x0600387F RID: 14463 RVA: 0x0012E4C2 File Offset: 0x0012C6C2
2178 // (set) Token: 0x06003880 RID: 14464 RVA: 0x0012E4D1 File Offset: 0x0012C6D1
2179 public bool KilledBossInVoid
2180 {
2181 get
2182 {
2183 return this.bits[13];
2184 }
2185 set
2186 {
2187 this.bits[13] = value;
2188 }
2189 }
2190
2191 // Token: 0x17001137 RID: 4407
2192 // (get) Token: 0x06003881 RID: 14465 RVA: 0x0012E4E1 File Offset: 0x0012C6E1
2193 // (set) Token: 0x06003882 RID: 14466 RVA: 0x0012E4F0 File Offset: 0x0012C6F0
2194 public bool statueShipped
2195 {
2196 get
2197 {
2198 return this.bits[14];
2199 }
2200 set
2201 {
2202 this.bits[14] = value;
2203 }
2204 }
2205
2206 // Token: 0x17001138 RID: 4408
2207 // (get) Token: 0x06003883 RID: 14467 RVA: 0x0012E500 File Offset: 0x0012C700
2208 // (set) Token: 0x06003884 RID: 14468 RVA: 0x0012E50F File Offset: 0x0012C70F
2209 public bool little_saved
2210 {
2211 get
2212 {
2213 return this.bits[15];
2214 }
2215 set
2216 {
2217 this.bits[15] = value;
2218 }
2219 }
2220
2221 // Token: 0x17001139 RID: 4409
2222 // (get) Token: 0x06003885 RID: 14469 RVA: 0x0012E51F File Offset: 0x0012C71F
2223 // (set) Token: 0x06003886 RID: 14470 RVA: 0x0012E52E File Offset: 0x0012C72E
2224 public bool little_killed
2225 {
2226 get
2227 {
2228 return this.bits[16];
2229 }
2230 set
2231 {
2232 this.bits[16] = value;
2233 }
2234 }
2235
2236 // Token: 0x1700113A RID: 4410
2237 // (get) Token: 0x06003887 RID: 14471 RVA: 0x0012E53E File Offset: 0x0012C73E
2238 // (set) Token: 0x06003888 RID: 14472 RVA: 0x0012E54D File Offset: 0x0012C74D
2239 public bool gotEtherDisease
2240 {
2241 get
2242 {
2243 return this.bits[17];
2244 }
2245 set
2246 {
2247 this.bits[17] = value;
2248 }
2249 }
2250
2251 // Token: 0x1700113B RID: 4411
2252 // (get) Token: 0x06003889 RID: 14473 RVA: 0x0012E55D File Offset: 0x0012C75D
2253 // (set) Token: 0x0600388A RID: 14474 RVA: 0x0012E56C File Offset: 0x0012C76C
2254 public bool loytelEscaped
2255 {
2256 get
2257 {
2258 return this.bits[18];
2259 }
2260 set
2261 {
2262 this.bits[18] = value;
2263 }
2264 }
2265
2266 // Token: 0x1700113C RID: 4412
2267 // (get) Token: 0x0600388B RID: 14475 RVA: 0x0012E57C File Offset: 0x0012C77C
2268 // (set) Token: 0x0600388C RID: 14476 RVA: 0x0012E58B File Offset: 0x0012C78B
2269 public bool magicChestSent
2270 {
2271 get
2272 {
2273 return this.bits[19];
2274 }
2275 set
2276 {
2277 this.bits[19] = value;
2278 }
2279 }
2280
2281 // Token: 0x1700113D RID: 4413
2282 // (get) Token: 0x0600388D RID: 14477 RVA: 0x0012E59B File Offset: 0x0012C79B
2283 // (set) Token: 0x0600388E RID: 14478 RVA: 0x0012E5A6 File Offset: 0x0012C7A6
2284 public int start
2285 {
2286 get
2287 {
2288 return this.ints[10];
2289 }
2290 set
2291 {
2292 this.ints[10] = value;
2293 }
2294 }
2295
2296 // Token: 0x1700113E RID: 4414
2297 // (get) Token: 0x0600388F RID: 14479 RVA: 0x0012E5B2 File Offset: 0x0012C7B2
2298 // (set) Token: 0x06003890 RID: 14480 RVA: 0x0012E5BD File Offset: 0x0012C7BD
2299 public int build
2300 {
2301 get
2302 {
2303 return this.ints[11];
2304 }
2305 set
2306 {
2307 this.ints[11] = value;
2308 }
2309 }
2310
2311 // Token: 0x1700113F RID: 4415
2312 // (get) Token: 0x06003891 RID: 14481 RVA: 0x0012E5C9 File Offset: 0x0012C7C9
2313 // (set) Token: 0x06003892 RID: 14482 RVA: 0x0012E5D4 File Offset: 0x0012C7D4
2314 public int main
2315 {
2316 get
2317 {
2318 return this.ints[13];
2319 }
2320 set
2321 {
2322 this.ints[13] = value;
2323 }
2324 }
2325
2326 // Token: 0x17001140 RID: 4416
2327 // (get) Token: 0x06003893 RID: 14483 RVA: 0x0012E5E0 File Offset: 0x0012C7E0
2328 // (set) Token: 0x06003894 RID: 14484 RVA: 0x0012E5EB File Offset: 0x0012C7EB
2329 public int storyFiama
2330 {
2331 get
2332 {
2333 return this.ints[14];
2334 }
2335 set
2336 {
2337 this.ints[14] = value;
2338 }
2339 }
2340
2341 // Token: 0x17001141 RID: 4417
2342 // (get) Token: 0x06003895 RID: 14485 RVA: 0x0012E5F7 File Offset: 0x0012C7F7
2343 // (set) Token: 0x06003896 RID: 14486 RVA: 0x0012E602 File Offset: 0x0012C802
2344 public int lutz
2345 {
2346 get
2347 {
2348 return this.ints[15];
2349 }
2350 set
2351 {
2352 this.ints[15] = value;
2353 }
2354 }
2355
2356 // Token: 0x17001142 RID: 4418
2357 // (get) Token: 0x06003897 RID: 14487 RVA: 0x0012E60E File Offset: 0x0012C80E
2358 // (set) Token: 0x06003898 RID: 14488 RVA: 0x0012E619 File Offset: 0x0012C819
2359 public int daysAfterQuestExploration
2360 {
2361 get
2362 {
2363 return this.ints[16];
2364 }
2365 set
2366 {
2367 this.ints[16] = value;
2368 }
2369 }
2370
2371 // Token: 0x17001143 RID: 4419
2372 // (get) Token: 0x06003899 RID: 14489 RVA: 0x0012E625 File Offset: 0x0012C825
2373 // (set) Token: 0x0600389A RID: 14490 RVA: 0x0012E630 File Offset: 0x0012C830
2374 public int landDeedBought
2375 {
2376 get
2377 {
2378 return this.ints[17];
2379 }
2380 set
2381 {
2382 this.ints[17] = value;
2383 }
2384 }
2385
2386 // Token: 0x17001144 RID: 4420
2387 // (get) Token: 0x0600389B RID: 14491 RVA: 0x0012E63C File Offset: 0x0012C83C
2388 // (set) Token: 0x0600389C RID: 14492 RVA: 0x0012E647 File Offset: 0x0012C847
2389 public int loytelMartLv
2390 {
2391 get
2392 {
2393 return this.ints[18];
2394 }
2395 set
2396 {
2397 this.ints[18] = value;
2398 }
2399 }
2400
2401 // Token: 0x0600389D RID: 14493 RVA: 0x0012E653 File Offset: 0x0012C853
2402 [OnSerializing]
2403 private void _OnSerializing(StreamingContext context)
2404 {
2405 this.ints[0] = (int)this.bits.Bits;
2406 }
2407
2408 // Token: 0x0600389E RID: 14494 RVA: 0x0012E668 File Offset: 0x0012C868
2409 [OnDeserialized]
2410 private void _OnDeserialized(StreamingContext context)
2411 {
2412 this.bits.Bits = (uint)this.ints[0];
2413 }
2414
2415 // Token: 0x0600389F RID: 14495 RVA: 0x0012E67D File Offset: 0x0012C87D
2416 public void OnCreateGame()
2417 {
2418 }
2419
2420 // Token: 0x060038A0 RID: 14496 RVA: 0x0012E67F File Offset: 0x0012C87F
2421 public void OnEnableDebug()
2422 {
2423 }
2424
2425 // Token: 0x060038A1 RID: 14497 RVA: 0x0012E681 File Offset: 0x0012C881
2426 public void OnBuild(Recipe r)
2427 {
2428 if (this.build == 0 && r.id == "workbench")
2429 {
2430 this.build = 1;
2431 }
2432 }
2433
2434 // Token: 0x060038A2 RID: 14498 RVA: 0x0012E6A4 File Offset: 0x0012C8A4
2435 public bool IsStoryPlayed(int flag)
2436 {
2437 return this.playedStories.Contains(flag);
2438 }
2439
2440 // Token: 0x060038A3 RID: 14499 RVA: 0x0012E6B4 File Offset: 0x0012C8B4
2441 public int GetStoryRowID(string idBook, string idStep)
2442 {
2443 foreach (Dictionary<string, string> dictionary in this.GetStoryExcelData(idBook).sheets["index"].list)
2444 {
2445 if (dictionary["step"] == idStep)
2446 {
2447 return dictionary["id"].ToInt();
2448 }
2449 }
2450 return 0;
2451 }
2452
2453 // Token: 0x060038A4 RID: 14500 RVA: 0x0012E740 File Offset: 0x0012C940
2454 public Dictionary<string, string> GetStoryRow(string idBook, int id)
2455 {
2456 foreach (Dictionary<string, string> dictionary in this.GetStoryExcelData(idBook).sheets["index"].list)
2457 {
2458 if (dictionary["id"].ToInt() == id)
2459 {
2460 return dictionary;
2461 }
2462 }
2463 return null;
2464 }
2465
2466 // Token: 0x060038A5 RID: 14501 RVA: 0x0012E7BC File Offset: 0x0012C9BC
2467 public ExcelData GetStoryExcelData(string idBook)
2468 {
2469 ExcelData excelData = this.storyExcel.TryGetValue(idBook, null);
2470 if (excelData == null)
2471 {
2472 excelData = new ExcelData();
2473 excelData.path = CorePath.DramaData + idBook + ".xlsx";
2474 excelData.BuildList("index");
2475 this.storyExcel.Add(idBook, excelData);
2476 }
2477 return excelData;
2478 }
2479
2480 // Token: 0x060038A6 RID: 14502 RVA: 0x0012E810 File Offset: 0x0012CA10
2481 public bool PlayStory(string idBook, int id, bool fromBook = false)
2482 {
2483 if (!fromBook && this.playedStories.Contains(id))
2484 {
2485 return false;
2486 }
2487 Dictionary<string, string> storyRow = this.GetStoryRow(idBook, id);
2488 SoundManager.ForceBGM();
2489 LayerDrama.Activate(idBook, storyRow["sheet"], storyRow["step"], null, null, "");
2490 if (!fromBook && !this.playedStories.Contains(id))
2491 {
2492 this.playedStories.Add(id);
2493 }
2494 return true;
2495 }
2496
2497 // Token: 0x060038A7 RID: 14503 RVA: 0x0012E880 File Offset: 0x0012CA80
2498 public bool PlayStory(int id, bool fromBook = false)
2499 {
2500 return this.PlayStory("_main", id, fromBook);
2501 }
2502
2503 // Token: 0x060038A8 RID: 14504 RVA: 0x0012E88F File Offset: 0x0012CA8F
2504 public void AddStory(int id)
2505 {
2506 if (!this.playedStories.Contains(id) && !this.availableStories.Contains(id))
2507 {
2508 this.availableStories.Add(id);
2509 Msg.Say("story_added");
2510 SE.WriteJournal();
2511 }
2512 }
2513
2514 // Token: 0x060038A9 RID: 14505 RVA: 0x0012E8CC File Offset: 0x0012CACC
2515 public void OnEnterZone()
2516 {
2517 if (EClass._zone.id == "nymelle")
2518 {
2519 if (EClass._zone.lv == -1)
2520 {
2521 this.AddStory(10);
2522 }
2523 if (EClass._zone.lv == -2)
2524 {
2525 this.AddStory(20);
2526 }
2527 if (EClass._zone.lv == -3)
2528 {
2529 this.AddStory(30);
2530 }
2531 }
2532 if (QuestMain.Phase == 700 && EClass._zone.id == "lothria")
2533 {
2534 this.PlayStory(50, false);
2535 }
2536 if ((EClass._zone.IsPCFaction || EClass._zone.id == EClass.game.Prologue.idStartZone) && this.availableStories.Count > 0)
2537 {
2538 this.PlayStory(this.availableStories[0], false);
2539 this.availableStories.RemoveAt(0);
2540 }
2541 }
2542
2543 // Token: 0x060038AA RID: 14506 RVA: 0x0012E9B6 File Offset: 0x0012CBB6
2544 public void OnLeaveZone()
2545 {
2546 if (QuestMain.Phase == 700)
2547 {
2548 this.PlayStory(40, false);
2549 }
2550 }
2551
2552 // Token: 0x040022C1 RID: 8897
2553 public const int MonoDeparture = 100;
2554
2555 // Token: 0x040022C2 RID: 8898
2556 [JsonProperty]
2557 public int[] ints = new int[50];
2558
2559 // Token: 0x040022C3 RID: 8899
2560 [JsonProperty]
2561 public List<int> playedStories = new List<int>();
2562
2563 // Token: 0x040022C4 RID: 8900
2564 [JsonProperty]
2565 public List<int> availableStories = new List<int>();
2566
2567 // Token: 0x040022C5 RID: 8901
2568 [JsonProperty]
2569 public HashSet<int> pleaseDontTouch = new HashSet<int>();
2570
2571 // Token: 0x040022C6 RID: 8902
2572 [JsonProperty]
2573 public List<string> reservedTutorial = new List<string>();
2574
2575 // Token: 0x040022C7 RID: 8903
2576 public BitArray32 bits;
2577
2578 // Token: 0x040022C8 RID: 8904
2579 public Dictionary<string, ExcelData> storyExcel = new Dictionary<string, ExcelData>();
2580 }
2581}
Definition Act.2.cs:7
Definition Card.cs:13
Definition Chara.cs:12
Definition Date.cs:6
Definition Game.cs:10
Definition Hoard.cs:10
Definition Msg.cs:7
Definition Point.cs:11
Definition Quest.cs:8
Definition Scene.cs:10
Definition Thing.cs:10
Definition Trait.cs:9
Definition Zone.cs:14