Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
NPCDebuffImmunityData.cs
Go to the documentation of this file.
1using Terraria.ID;
2
4
6{
7 public bool ImmuneToWhips;
8
10
12
13 public void ApplyToNPC(NPC npc)
14 {
16 {
17 for (int i = 1; i < BuffID.Count; i++)
18 {
19 bool flag = BuffID.Sets.IsAnNPCWhipDebuff[i];
20 bool flag2 = false;
21 flag2 |= flag && ImmuneToWhips;
22 flag2 |= !flag && ImmuneToAllBuffsThatAreNotWhips;
23 npc.buffImmune[i] = flag2;
24 }
25 }
26 if (SpecificallyImmuneTo != null)
27 {
28 for (int j = 0; j < SpecificallyImmuneTo.Length; j++)
29 {
30 int num = SpecificallyImmuneTo[j];
31 npc.buffImmune[num] = true;
32 }
33 }
34 }
35}
static bool[] IsAnNPCWhipDebuff
Definition BuffID.cs:22
static readonly int Count
Definition BuffID.cs:1069
bool[] buffImmune
Definition NPC.cs:217