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

◆ ProbeTownNPCs()

void Terraria.GameContent.UI.EmoteBubble.ProbeTownNPCs ( List< int > list)
inlineprivate

Definition at line 654 of file EmoteBubble.cs.

655 {
656 for (int i = 0; i < NPCLoader.NPCCount; i++)
657 {
658 CountNPCs[i] = 0;
659 }
660 for (int j = 0; j < 200; j++)
661 {
662 if (Main.npc[j].active)
663 {
664 CountNPCs[Main.npc[j].type]++;
665 }
666 }
667 int type = ((NPC)anchor.entity).type;
668 for (int k = 0; k < NPCLoader.NPCCount; k++)
669 {
670 if (NPCID.Sets.FaceEmote[k] > 0 && CountNPCs[k] > 0 && k != type)
671 {
672 list.Add(NPCID.Sets.FaceEmote[k]);
673 }
674 }
675 }
static int[] FaceEmote
Associates a town NPC's NPC type (F:Terraria.NPC.type) with its corresponding T:Terraria....
Definition NPCID.cs:439
This serves as the central class from which NPC-related functions are carried out....
Definition NPCLoader.cs:26

References Terraria.GameContent.UI.EmoteBubble.anchor, Terraria.GameContent.UI.EmoteBubble.CountNPCs, Terraria.GameContent.UI.WorldUIAnchor.entity, Terraria.ID.NPCID.Sets.FaceEmote, Terraria.Main.npc, and Terraria.ModLoader.NPCLoader.NPCCount.

Referenced by Terraria.GameContent.UI.EmoteBubble.PickNPCEmote().

+ Here is the caller graph for this function: