Elin Modding Docs Doc
Loading...
Searching...
No Matches
FactionRelation.cs
1using System;
2using Newtonsoft.Json;
3using UnityEngine;
4
5// Token: 0x02000068 RID: 104
6public class FactionRelation : EClass
7{
8 // Token: 0x17000083 RID: 131
9 // (get) Token: 0x060002C5 RID: 709 RVA: 0x00014FE9 File Offset: 0x000131E9
10 public int ExpToNext
11 {
12 get
13 {
14 return 100 + this.rank * this.rank * 100;
15 }
16 }
17
18 // Token: 0x17000084 RID: 132
19 // (get) Token: 0x060002C6 RID: 710 RVA: 0x00014FFE File Offset: 0x000131FE
20 public int MaxRank
21 {
22 get
23 {
24 return 5;
25 }
26 }
27
28 // Token: 0x060002C7 RID: 711 RVA: 0x00015001 File Offset: 0x00013201
29 public int GetSalary()
30 {
31 if (this.type != FactionRelation.RelationType.Member)
32 {
33 return 0;
34 }
35 return this.rank * 100;
36 }
37
38 // Token: 0x17000085 RID: 133
39 // (get) Token: 0x060002C8 RID: 712 RVA: 0x00015017 File Offset: 0x00013217
40 public string TextTitle
41 {
42 get
43 {
44 return Lang.GetList("guild_title")[Mathf.Min(this.rank / 2, 5)];
45 }
46 }
47
48 // Token: 0x060002C9 RID: 713 RVA: 0x00015032 File Offset: 0x00013232
49 public string GetTextRelation()
50 {
51 return ("faction_" + this.type.ToString()).lang();
52 }
53
54 // Token: 0x060002CA RID: 714 RVA: 0x00015054 File Offset: 0x00013254
55 public void SetTextHostility(UIText text)
56 {
57 if (this.IsMember() || this.affinity > 100)
58 {
59 text.SetText("reFriend".lang(), FontColor.Good);
60 return;
61 }
62 if (this.affinity < -100)
63 {
64 text.SetText("reEnemy".lang(), FontColor.Bad);
65 return;
66 }
67 text.SetText("reNeutral".lang(), FontColor.Passive);
68 }
69
70 // Token: 0x060002CB RID: 715 RVA: 0x000150B2 File Offset: 0x000132B2
71 public bool IsMember()
72 {
73 return this.type == FactionRelation.RelationType.Member || this.type == FactionRelation.RelationType.Owner;
74 }
75
76 // Token: 0x060002CC RID: 716 RVA: 0x000150C8 File Offset: 0x000132C8
77 public void Promote()
78 {
79 this.exp -= this.ExpToNext;
80 this.rank++;
81 Msg.Say("faction_promote");
82 SE.Play("questComplete");
83 }
84
85 // Token: 0x0400053A RID: 1338
86 [JsonProperty]
87 public int affinity;
88
89 // Token: 0x0400053B RID: 1339
90 [JsonProperty]
91 public int exp;
92
93 // Token: 0x0400053C RID: 1340
94 [JsonProperty]
95 public int rank;
96
97 // Token: 0x0400053D RID: 1341
98 [JsonProperty]
99 public FactionRelation.RelationType type;
100
101 // Token: 0x0400053E RID: 1342
102 public Faction faction;
103
104 // Token: 0x020007D8 RID: 2008
105 public enum RelationType
106 {
107 // Token: 0x04002206 RID: 8710
108 Default,
109 // Token: 0x04002207 RID: 8711
110 Owner,
111 // Token: 0x04002208 RID: 8712
112 Member
113 }
114}
Definition Msg.cs:7