Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
PlayerStatsSnapshot.cs
Go to the documentation of this file.
2
3public struct PlayerStatsSnapshot
4{
5 public int Life;
6
7 public int LifeMax;
8
9 public int LifeFruitCount;
10
11 public float LifePerSegment;
12
13 public int Mana;
14
15 public int ManaMax;
16
17 public float ManaPerSegment;
18
20 {
21 Life = player.statLife;
22 Mana = player.statMana;
23 LifeMax = player.statLifeMax2;
24 ManaMax = player.statManaMax2;
25 float num = 20f;
26 int num2 = player.statLifeMax / 20;
27 int num3 = (player.statLifeMax - 400) / 5;
28 if (num3 < 0)
29 {
30 num3 = 0;
31 }
32 if (num3 > 0)
33 {
34 num2 = player.statLifeMax / (20 + num3 / 4);
35 num = (float)player.statLifeMax / 20f;
36 }
37 int num4 = player.statLifeMax2 - player.statLifeMax;
38 num += (float)(num4 / num2);
39 LifeFruitCount = num3;
40 LifePerSegment = num;
41 ManaPerSegment = 20f;
42 }
43}