83488 {
83489
83490
83491
83492
83494 {
83495 return;
83496 }
83498 {
83500 return;
83501 }
83503 bool flag2 =
false;
83504 Rectangle
rectangle =
default(Rectangle);
83508 for (int i = 0; i < 255; i++)
83509 {
83510 if (!Main.player[i].active)
83511 {
83512 continue;
83513 }
83514 Rectangle
hitbox = Main.player[i].Hitbox;
83516 {
83519 {
83520 if (Main.slimeRain && Main.slimeRainNPC[
type])
83521 {
83522 Main.player[i].nearbyActiveNPCs +=
npcSlots * Main.slimeRainNPCSlots;
83523 }
83524 else
83525 {
83526 Main.player[i].nearbyActiveNPCs +=
npcSlots;
83527 }
83528 }
83529 }
83531 {
83532 continue;
83533 }
83535 {
83538 if (i == Main.myPlayer && (
type == 604 ||
type == 605))
83539 {
83541 }
83542 }
83544 {
83546 }
83548 {
83549 case 7:
83550 case 10:
83551 case 13:
83552 case 35:
83553 case 36:
83554 case 39:
83555 case 87:
83556 case 127:
83557 case 128:
83558 case 129:
83559 case 130:
83560 case 131:
83561 case 392:
83562 case 393:
83563 case 394:
83564 case 491:
83565 case 492:
83567 break;
83568 case 399:
83569 if (
ai[0] == 2
f ||
ai[0] == 1
f)
83570 {
83572 }
83574 break;
83575 case 583:
83576 case 584:
83577 case 585:
83578 if (!Main.dayTime &&
ai[2] == 0
f)
83579 {
83582 }
83583 break;
83584 }
83585 }
83587 {
83588 return;
83589 }
83592 {
83594 }
83596 {
83599 if (Main.netMode == 2)
83600 {
83603 NetMessage.SendData(23, -1, -1,
null,
whoAmI);
83604 }
83606 {
83608 }
83610 }
83611 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Vector2 position
The position of this Entity in world coordinates.
int width
The width of this Entity's hitbox, in pixels.
bool active
If true, the Entity actually exists within the game world. Within the specific entity array,...
int height
The height of this Entity's hitbox, in pixels.
static bool SavesAndLoads(NPC npc)
static bool CheckActive(NPC npc)
This serves as the central class from which NPC-related functions are carried out....
bool boss
Set to true if the NPC is a boss. Prevents off-screen despawn. Bosses also need [AutoloadBossHead] an...
static CoinLossRevengeSystem RevengeManager
bool DoesntDespawnToInactivity()
int lifeMax
The maximum life of this NPC.
float[] ai
An array with 4 slots used for any sort of data storage, which is occasionally synced from the server...
int type
The NPC ID of this NPC. The NPC ID is a unique number assigned to each NPC loaded into the game....
bool DoesntDespawnToInactivityAndCountsNPCSlots()
float npcSlots
Represents how much this npc counts towards the npc spawn limit. Small critters like worms or flies h...
void CheckActive_WormSegments()
void LadyBugLuck(int plr, bool GoldLadyBug=false)
void AddIntoPlayersTownNPCSlots()
short releaseOwner
Identifies the player who released this NPC into the world. Used mainly for released critters....
int life
The current life of the NPC. Automatically set to the value of F:Terraria.NPC.lifeMax at the end of S...