Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
NPCWasChatWithTracker.cs
Go to the documentation of this file.
2using System.IO;
4using Terraria.ID;
5using Terraria.Net;
6
8
10{
11 private object _entryCreationLock = new object();
12
14
19
20 public void RegisterChatStartWith(NPC npc)
21 {
25 {
27 }
28 if (Main.netMode == 2 && flag)
29 {
31 }
32 }
33
41
42 public bool GetWasChatWith(NPC npc)
43 {
46 }
47
48 public bool GetWasChatWith(string persistentId)
49 {
51 }
52
53 public void Save(BinaryWriter writer)
54 {
56 {
57 writer.Write(_chattedWithPlayer.Count);
58 foreach (string item in _chattedWithPlayer)
59 {
60 writer.Write(item);
61 }
62 }
63 }
64
66 {
67 int num = reader.ReadInt32();
68 for (int i = 0; i < num; i++)
69 {
70 string item = reader.ReadString();
72 }
73 }
74
76 {
77 int num = reader.ReadInt32();
78 for (int i = 0; i < num; i++)
79 {
80 reader.ReadString();
81 }
82 }
83
84 public void Reset()
85 {
87 }
88
90 {
91 foreach (string item in _chattedWithPlayer)
92 {
93 if (ContentSamples.NpcNetIdsByPersistentIds.TryGetValue(item, out var value))
94 {
96 }
97 }
98 }
99}
void ICollection< T >. Add(T item)
Definition HashSet.cs:225
virtual string ReadString()
virtual int ReadInt32()
void ValidateWorld(BinaryReader reader, int gameVersionSaveWasMadeOn)
void Load(BinaryReader reader, int gameVersionSaveWasMadeOn)
static Dictionary< string, int > NpcNetIdsByPersistentIds
static int netMode
Definition Main.cs:2095
string GetBestiaryCreditId()
Definition NPC.cs:91802
int netID
Definition NPC.cs:531
static readonly NetManager Instance
Definition NetManager.cs:18