Elin Modding Docs Doc
Loading...
Searching...
No Matches
Hobby.cs
1using System;
2
3// Token: 0x0200029F RID: 671
4public class Hobby : EClass
5{
6 // Token: 0x060015A0 RID: 5536 RVA: 0x00093934 File Offset: 0x00091B34
7 public AIWork GetAI(Chara c)
8 {
9 string str = "AIWork_" + this.source.ai.IsEmpty(this.source.alias);
10 AIWork aiwork;
11 if (Type.GetType(str + ", Elin") != null)
12 {
13 aiwork = ClassCache.Create<AIWork>(str, "Elin");
14 }
15 else
16 {
17 aiwork = new AIWork();
18 }
19 aiwork.owner = c;
20 aiwork.sourceWork = this.source;
21 return aiwork;
22 }
23
24 // Token: 0x060015A1 RID: 5537 RVA: 0x000939A9 File Offset: 0x00091BA9
25 public int GetLv(Chara c)
26 {
27 if (!this.source.skill.IsEmpty())
28 {
29 return c.Evalue(this.source.skill);
30 }
31 return c.LV;
32 }
33
34 // Token: 0x060015A2 RID: 5538 RVA: 0x000939D8 File Offset: 0x00091BD8
35 public int GetEfficiency(Chara c)
36 {
37 int num = 50;
38 if (c.homeBranch == null || c.currentZone != c.homeBranch.owner)
39 {
40 return 0;
41 }
42 if (c.currentZone == EClass._zone)
43 {
44 if ((!this.source.destTrait.IsEmpty() || !this.source.workTag.IsEmpty()) && !this.GetAI(c).SetDestination())
45 {
46 return 0;
47 }
48 if (c.noMove && c.pos.FindThing<TraitGeneratorWheel>() != null)
49 {
50 return 0;
51 }
52 TraitBed traitBed = c.FindBed();
53 if (traitBed != null)
54 {
55 num += 30 + traitBed.owner.GetTotalQuality(true) + traitBed.owner.Evalue(750);
56 }
57 }
58 if (this.source.alias == "Breeding")
59 {
60 num = num * c.race.breeder / 100;
61 }
62 num += this.GetLv(c);
63 return num * (100 + c.homeBranch.Evalue(3708) * 10) / 100;
64 }
65
66 // Token: 0x17000604 RID: 1540
67 // (get) Token: 0x060015A3 RID: 5539 RVA: 0x00093AD9 File Offset: 0x00091CD9
68 public SourceHobby.Row source
69 {
70 get
71 {
72 return EClass.sources.hobbies.map[this.id];
73 }
74 }
75
76 // Token: 0x17000605 RID: 1541
77 // (get) Token: 0x060015A4 RID: 5540 RVA: 0x00093AF5 File Offset: 0x00091CF5
78 public string Name
79 {
80 get
81 {
82 return this.source.GetName();
83 }
84 }
85
86 // Token: 0x04001014 RID: 4116
87 public int id;
88}
Definition Chara.cs:12
Definition Hobby.cs:5