Elin Modding Docs Doc
Loading...
Searching...
No Matches
ZonePreEnterBoutWin.cs
1using System;
2using UnityEngine;
3
4// Token: 0x02000750 RID: 1872
6{
7 // Token: 0x06003643 RID: 13891 RVA: 0x00126C48 File Offset: 0x00124E48
8 public override void Execute()
9 {
10 if (this.target == null)
11 {
12 string str = "exception: target not found:";
13 Chara chara = this.target;
14 Debug.LogError(str + ((chara != null) ? chara.ToString() : null));
15 return;
16 }
17 Thing thing = null;
18 int num = 0;
19 foreach (Thing thing2 in this.target.things)
20 {
21 if (thing2.isEquipped && !thing2.isGifted && (thing2.GetPrice(CurrencyType.Money, false, PriceType.Default, null) > num || thing2.rarity >= Rarity.Artifact))
22 {
23 thing = thing2;
24 num = thing2.GetPrice(CurrencyType.Money, false, PriceType.Default, null);
25 }
26 }
27 if (thing == null)
28 {
29 thing = ThingGen.Create("plat", -1, -1).SetNum(EClass.rndHalf(this.target.LV / 10 + 2));
30 }
31 else
32 {
33 this.target.RemoveCard(thing);
34 this.target.EQ_CAT(thing.category.id);
35 }
36 this.target.SetInt(111, this.target.GetInt(111, null) + 1);
37 SE.Play("questComplete");
38 EClass._map.TrySmoothPick(EClass.pc.pos, thing, EClass.pc);
39 EClass.player.ModFame(EClass.rndHalf(Mathf.Max(10, 10 + (this.target.LV - EClass.pc.LV) * 3)));
40 }
41
42 // Token: 0x04001CA7 RID: 7335
43 public Chara target;
44}
Definition Chara.cs:12
Definition Thing.cs:10