Elin Modding Docs Doc
All Classes Namespaces
SlaverData.cs
1using System;
2using System.Collections.Generic;
3using Newtonsoft.Json;
4
5// Token: 0x020005AD RID: 1453
6public class SlaverData : EClass
7{
8 // Token: 0x060027E7 RID: 10215 RVA: 0x000E17C8 File Offset: 0x000DF9C8
9 public void TryRefresh(Chara owner)
10 {
11 if (!EClass.world.date.IsExpired(this.dateRefresh))
12 {
13 return;
14 }
15 this.list.Clear();
16 int num = 4 + EClass.rnd(4);
17 for (int i = 0; i < num; i++)
18 {
19 Chara item;
20 if (owner.trait.SlaverType == SlaverType.Animal)
21 {
22 if (EClass._zone is Zone_Yowyn && EClass.rnd(3) != 0)
23 {
24 item = CharaGen.Create(SpawnListChara.Get("slaver_horse", (SourceChara.Row s) => s.id == "horse_yowyn").Select(-1, -1).id, -1);
25 }
26 else
27 {
28 item = CharaGen.Create(SpawnListChara.Get("slaver_animal", (SourceChara.Row s) => EClass.sources.races.map[s.race].tag.Contains("animal")).Select(-1, -1).id, -1);
29 }
30 }
31 else
32 {
33 item = CharaGen.Create(SpawnListChara.Get("slaver_human", (SourceChara.Row s) => EClass.sources.races.map[s.race].tag.Contains("human")).Select(-1, -1).id, -1);
34 }
35 this.list.Add(item);
36 }
37 this.dateRefresh = EClass.world.date.GetRaw(168);
38 owner.isRestocking = true;
39 }
40
41 // Token: 0x04001620 RID: 5664
42 [JsonProperty]
43 public List<Chara> list = new List<Chara>();
44
45 // Token: 0x04001621 RID: 5665
46 [JsonProperty]
47 public int dateRefresh;
48}
Definition Chara.cs:12