tModLoader v2024.11
A mod to make and play Terraria mods
NPCKillsTracker Class Reference

Inherits IPersistentPerWorldContent, and IOnPlayerJoining.

Public Member Functions

int GetKillCount (NPC npc)
 
int GetKillCount (string persistentId)
 
void Load (BinaryReader reader, int gameVersionSaveWasMadeOn)
 
void OnPlayerJoining (int playerIndex)
 
void RegisterKill (NPC npc)
 
void Reset ()
 
void Save (BinaryWriter writer)
 
void SetKillCountDirectly (string persistentId, int killCount)
 
void ValidateWorld (BinaryReader reader, int gameVersionSaveWasMadeOn)
 
void Load (BinaryReader reader, int gameVersionSaveWasMadeOn)
 
void Reset ()
 
void Save (BinaryWriter writer)
 
void ValidateWorld (BinaryReader reader, int gameVersionSaveWasMadeOn)
 
void OnPlayerJoining (int playerIndex)
 

Static Public Attributes

const int POSITIVE_KILL_COUNT_CAP = 999999999
 

Member Function Documentation

◆ Load()

void NPCKillsTracker.Load ( BinaryReader  reader,
int  gameVersionSaveWasMadeOn 
)

◆ OnPlayerJoining()

void NPCKillsTracker.OnPlayerJoining ( int  playerIndex)

Implements IOnPlayerJoining.

◆ Reset()

void NPCKillsTracker.Reset ( )

◆ Save()

void NPCKillsTracker.Save ( BinaryWriter  writer)

◆ ValidateWorld()

void NPCKillsTracker.ValidateWorld ( BinaryReader  reader,
int  gameVersionSaveWasMadeOn 
)