Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ SubAI_HandleTemporaryCatchableNPCPlayerInvulnerability()

void Terraria.NPC.SubAI_HandleTemporaryCatchableNPCPlayerInvulnerability ( )
inlineprivate

Definition at line 87370 of file NPC.cs.

87371 {
87372 if (type >= 0 && type < NPCID.Count && Main.npcCatchable[type])
87373 {
87374 if (releaseOwner != 255 || SpawnedFromStatue)
87375 {
87377 }
87378 bool num = friendly;
87380 {
87382 friendly = true;
87383 }
87384 else
87385 {
87386 friendly = false;
87387 }
87388 if (num != friendly)
87389 {
87390 netUpdate = true;
87391 }
87392 }
87393 }
static readonly short Count
Definition NPCID.cs:11744
bool SpawnedFromStatue
Definition NPC.cs:85
bool friendly
Definition NPC.cs:555
int type
Definition NPC.cs:445
int catchableNPCTempImmunityCounter
Definition NPC.cs:529
short releaseOwner
Definition NPC.cs:107
bool netUpdate
Definition NPC.cs:507

References Terraria.ID.NPCID.Count, Terraria.Main.npcCatchable, and System.type.