10 public override void OnInit()
12 if (
ELayer._zone.IsPCFaction)
14 ELayer._zone.branch.UpdateReqruits(
false);
16 this.windows[0].setting.tabs[1].disable = !
ELayer._zone.IsPCFaction;
20 public override void OnSwitchContent(Window window)
31 this.RefreshRanking();
34 WindowMenu menuRight = this.windows[0].menuRight;
36 if (window.idTab == 0)
38 menuRight.AddButton(
"rerollQuest".lang(1.ToString() ??
"",
null,
null,
null,
null), delegate(UIButton b)
40 if (
ELayer._zone.influence < 1)
43 Msg.Say(
"notEnoughInfluence");
47 ELayer._zone.UpdateQuests(
true);
50 int influence = zone.influence;
51 zone.influence = influence - 1;
57 public void RefreshQuest()
65 b.button.SetOnClick(delegate
72 ELayer._zone.UpdateQuests(
false);
73 foreach (
Quest quest
in ELayer.game.quests.globalList)
75 if (quest.IsVisibleOnQuestBoard())
82 if (chara.quest !=
null && !
ELayer.game.quests.list.Contains(chara.quest) && !chara.IsPCParty && chara.memberType == FactionMemberType.Default && chara.quest.IsVisibleOnQuestBoard())
84 this.list.Add(chara.quest);
87 this.list.Refresh(
false);
88 this.textQuestLimit.SetText(
"questLimit".lang(
ELayer.game.quests.CountRandomQuest().ToString() ??
"", 5.ToString() ??
"",
null,
null,
null));
92 public void RefreshHire()
94 UIList list = this.listHire;
101 GameLang.refDrama1 =
string.Concat(
new string[]
109 Thing thing =
ELayer.pc.things.Find(
"ticket_resident", -1, -1);
110 GameLang.refDrama2 = (((thing !=
null) ? thing.Name :
null) ??
"");
111 a.chara.ShowDialog(
"_chara",
"4-1",
"").onKill.AddListener(
new UnityAction(this.RefreshHire));
115 Chara chara = a.chara;
118 b.item.text1.text = cost.ToString().TagColorGoodBad(() =>
ELayer.pc.GetCurrency(
"money2") >= cost ||
ELayer.pc.things.Find(
"ticket_resident", -1, -1) !=
null,
false);
119 b.item.text2.text = ((a.Days == -1) ?
"-" : (a.Days.ToString() ??
""));
121 foreach (HintIcon hintIcon
in b.layoutTag.GetComponentsInChildren<HintIcon>())
123 Action onPointerDown;
124 if ((onPointerDown = <>9__3) ==
null)
126 onPointerDown = (<>9__3 = delegate()
128 list.callbacks.OnClick(a, b);
131 hintIcon.onPointerDown = onPointerDown;
133 b.textHobby.text = chara.GetTextHobby(
false);
134 b.textWork.text = chara.GetTextWork(
false);
135 b.textLifeStyle.text =
"lifestyle".lang() +
": " + (
"lifestyle_" + chara.idTimeTable).lang();
136 b.item.image1.SetActive(a.isNew);
142 if (!hireInfo.chara.IsHomeMember() && (hireInfo.chara.currentZone ==
null || !hireInfo.chara.currentZone.IsPlayerFaction))
148 this.RebuildLayout(
true);
152 public void RefreshRanking()
154 UIDynamicList list = this.listRanking;
156 BaseList baseList = list;
164 int advRank = a.trait.GetAdvRank();
165 b.textAlias.SetText(a.trait.GetAdvRankText());
166 b.textAlias.color = this.gradientRank.Evaluate(0.1f * (
float)advRank);
167 b.item.image2.SetActive(a.IsPCFaction);
169 callback.onList = delegate(UIList.SortMode m)
171 foreach (
Chara chara
in ELayer.game.cards.globalCharas.Values)
173 if (chara.trait.ShowAdvRank)
180 callback.onRefresh =
null;
181 baseList.callbacks = callback;
183 int num = list.objects.IndexOf(
ELayer.pc);
186 list.dsv.scrollByItemIndex(num);
189 this.RebuildLayout(
true);
193 public override void OnKill()
195 if (
ELayer.Branch !=
null)
197 ELayer.Branch.ClearNewRecruits();
203 internal static int <RefreshRanking>g__GetSortVal|18_0(
Chara c)
205 return c.trait.GetAdvRank() * 10000 + Mathf.Clamp(c.LV, 0, 1000) + ((c.trait is
TraitAdventurerBacker) ? 1000 : 0);
212 public UIList listHire;
215 public UIDynamicList listRanking;
218 public UIText textClient;
221 public UIText textTitle;
224 public UIText textDetail;
227 public UIText textHours;
230 public UIText textNote;
233 public UIText textReward;
236 public UIText textQuestLimit;
242 public UIButton buttonTalk;
248 public Gradient gradientRank;