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

◆ PickNPCEmote()

void Terraria.GameContent.UI.EmoteBubble.PickNPCEmote ( WorldUIAnchor other = null)
inline

Definition at line 280 of file EmoteBubble.cs.

281 {
282 Player plr = Main.player[Player.FindClosest(((NPC)anchor.entity).Center, 0, 0)];
283 List<int> list = new List<int>();
284 bool flag = false;
285 for (int i = 0; i < 200; i++)
286 {
287 if (Main.npc[i].active && Main.npc[i].boss)
288 {
289 flag = true;
290 }
291 }
292 if (!flag)
293 {
294 if (Main.rand.Next(3) == 0)
295 {
297 }
298 if (Main.rand.Next(3) == 0)
299 {
301 }
302 if (Main.rand.Next(3) == 0)
303 {
305 }
306 if (Main.rand.Next(2) == 0)
307 {
309 }
310 if (Main.rand.Next(2) == 0)
311 {
313 }
314 if (Main.rand.Next(5) == 0)
315 {
317 }
318 if (Main.rand.Next(2) == 0)
319 {
321 }
322 if (Main.rand.Next(2) == 0)
323 {
325 }
326 if (Main.rand.Next(2) == 0)
327 {
329 }
331 }
332 else
333 {
335 }
336 if (list.Count > 0)
337 {
338 emote = list[Main.rand.Next(list.Count)];
339 }
340 }
void ProbeEvents(List< int > list)
void ProbeExceptions(List< int > list, Player plr, WorldUIAnchor other)
void ProbeWeather(List< int > list, Player plr)
void ProbeDebuffs(List< int > list, Player plr)
void ProbeItems(List< int > list, Player plr)
void ProbeCritters(List< int > list)
void ProbeTownNPCs(List< int > list)
void ProbeEmotions(List< int > list)
void ProbeCombat(List< int > list)
void ProbeBiomes(List< int > list, Player plr)
void ProbeBosses(List< int > list)

References Terraria.GameContent.UI.EmoteBubble.anchor, Terraria.GameContent.UI.EmoteBubble.emote, Terraria.GameContent.UI.WorldUIAnchor.entity, Terraria.Player.FindClosest(), System.list, Terraria.Main.npc, System.other, Terraria.Main.player, Terraria.GameContent.UI.EmoteBubble.ProbeBiomes(), Terraria.GameContent.UI.EmoteBubble.ProbeBosses(), Terraria.GameContent.UI.EmoteBubble.ProbeCombat(), Terraria.GameContent.UI.EmoteBubble.ProbeCritters(), Terraria.GameContent.UI.EmoteBubble.ProbeDebuffs(), Terraria.GameContent.UI.EmoteBubble.ProbeEmotions(), Terraria.GameContent.UI.EmoteBubble.ProbeEvents(), Terraria.GameContent.UI.EmoteBubble.ProbeExceptions(), Terraria.GameContent.UI.EmoteBubble.ProbeItems(), Terraria.GameContent.UI.EmoteBubble.ProbeTownNPCs(), Terraria.GameContent.UI.EmoteBubble.ProbeWeather(), and Terraria.Main.rand.