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

◆ MakeLocalPlayerEmote()

static void Terraria.GameContent.UI.EmoteBubble.MakeLocalPlayerEmote ( int emoteId)
inlinestatic

Send a emote from P:Terraria.Main.LocalPlayer. Should never be called on server.

Parameters
emoteId

Definition at line 455 of file EmoteBubble.cs.

456 {
457 if (Main.netMode == 0)
458 {
459 NewBubble(emoteId, new WorldUIAnchor((Entity)Main.LocalPlayer), 360);
460 CheckForNPCsToReactToEmoteBubble(emoteId, Main.LocalPlayer);
461 }
462 else
463 {
464 NetMessage.SendData(120, -1, -1, null, Main.myPlayer, emoteId);
465 }
466 }
static void CheckForNPCsToReactToEmoteBubble(int emoteID, Player player)
Try to find a NPC close enough (less than 200 pixels) to react to the emote sent by the player.
static int NewBubble(int emoticon, WorldUIAnchor bubbleAnchor, int time)
Use this method to spawn a emote bubble.

References Terraria.GameContent.UI.EmoteBubble.CheckForNPCsToReactToEmoteBubble(), Terraria.Main.LocalPlayer, Terraria.Main.myPlayer, Terraria.Main.netMode, Terraria.GameContent.UI.EmoteBubble.NewBubble(), and Terraria.NetMessage.SendData().

Referenced by Terraria.GameContent.UI.Elements.EmoteButton.LeftClick(), Terraria.GameContent.LucyAxeMessage.SpawnEmoteBubble(), Terraria.Player.UpdateHungerBuffs(), and Terraria.Player.UpdateStarvingState().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: