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

◆ ProbeTownNPCs()

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

Definition at line 451 of file EmoteBubble.cs.

452 {
453 for (int i = 0; i < NPCID.Count; i++)
454 {
455 CountNPCs[i] = 0;
456 }
457 for (int j = 0; j < 200; j++)
458 {
459 if (Main.npc[j].active)
460 {
461 CountNPCs[Main.npc[j].type]++;
462 }
463 }
464 int type = ((NPC)anchor.entity).type;
465 for (int k = 0; k < NPCID.Count; k++)
466 {
467 if (NPCID.Sets.FaceEmote[k] > 0 && CountNPCs[k] > 0 && k != type)
468 {
469 list.Add(NPCID.Sets.FaceEmote[k]);
470 }
471 }
472 }
static int[] FaceEmote
Definition NPCID.cs:4208
static readonly short Count
Definition NPCID.cs:11744

References Terraria.GameContent.UI.EmoteBubble.anchor, Terraria.ID.NPCID.Count, Terraria.GameContent.UI.EmoteBubble.CountNPCs, Terraria.GameContent.UI.WorldUIAnchor.entity, Terraria.ID.NPCID.Sets.FaceEmote, System.list, Terraria.Main.npc, and System.type.

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