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

◆ SendNPCHousesAndTravelShop()

static void Terraria.NetMessage.SendNPCHousesAndTravelShop ( int plr)
inlinestaticprivate

Definition at line 2986 of file NetMessage.cs.

2987 {
2988 bool flag = false;
2989 for (int i = 0; i < 200; i++)
2990 {
2991 NPC nPC = Main.npc[i];
2992 if (!nPC.active)
2993 {
2994 continue;
2995 }
2996 bool flag2 = nPC.townNPC && NPC.TypeToDefaultHeadIndex(nPC.type) > 0;
2997 if (nPC.aiStyle == 7)
2998 {
2999 flag2 = true;
3000 }
3001 if (flag2)
3002 {
3003 if (!flag && nPC.type == 368)
3004 {
3005 flag = true;
3006 }
3007 byte householdStatus = WorldGen.TownManager.GetHouseholdStatus(nPC);
3008 SendData(60, plr, -1, null, i, nPC.homeTileX, nPC.homeTileY, (int)householdStatus);
3009 }
3010 }
3011 if (flag)
3012 {
3014 }
3015 }
static void SendData(int msgType, int remoteClient=-1, int ignoreClient=-1, NetworkText text=null, int number=0, float number2=0f, float number3=0f, float number4=0f, int number5=0, int number6=0, int number7=0)
static void SendTravelShop(int remoteClient)

References Terraria.Main.npc, Terraria.NetMessage.SendData(), Terraria.NetMessage.SendTravelShop(), Terraria.WorldGen.TownManager, and Terraria.NPC.TypeToDefaultHeadIndex().

Referenced by Terraria.NetMessage.SyncConnectedPlayer().

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