-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathElementalPlayer.cs
48 lines (43 loc) · 1.14 KB
/
ElementalPlayer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
namespace ElementalWeaponEnhancements
{
class ElementalPlayer : ModPlayer
{
public List<float> elementDamage;
// Copy element modifiers
public override void Initialize()
{
try
{
elementDamage = new List<float>();
for (int i = 0; i < ElementalFramework.Data.elementData.Count; i++)
{
elementDamage.Add(1f);
}
//ErrorLogger.Log("SIZE: " + elementDamage.ToString());
}
catch (Exception e)
{
ErrorLogger.Log(e.ToString());
}
}
// Reset modifiers to default
public override void ResetEffects()
{
if (elementDamage.Any())
{
for (int i = 0; i < elementDamage.Count; i++)
{
elementDamage[i] = 1f;
}
}
}
}
}