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

◆ getNewNPCName()

string Terraria.NPC.getNewNPCName ( )
inline

Definition at line 2226 of file NPC.cs.

2227 {
2230 if (!string.IsNullOrEmpty(npcNameCategoryKey))
2231 {
2232 npcNameList = LanguageManager.Instance.GetLocalizedEntriesInCategory(npcNameCategoryKey);
2233 }
2235 if (npcNameList != null && npcNameList.Count > 0)
2236 {
2237 return npcNameList[WorldGen.genRand.Next(npcNameList.Count)];
2238 }
2239 return "";
2240 }
static List< string > ModifyNPCNameList(NPC npc, List< string > nameList)
This serves as the central class from which NPC-related functions are carried out....
Definition NPCLoader.cs:26
int type
The NPC ID of this NPC. The NPC ID is a unique number assigned to each NPC loaded into the game....
Definition NPC.cs:990
static string getNewNPCNameInner(int npcType)
Definition NPC.cs:2242

References Terraria.WorldGen.genRand, Terraria.NPC.getNewNPCNameInner(), Terraria.Localization.LanguageManager.Instance, Terraria.ModLoader.NPCLoader.ModifyNPCNameList(), and Terraria.NPC.type.

Referenced by Terraria.GameContent.Profiles.LegacyNPCProfile.GetNameForVariant(), Terraria.GameContent.Profiles.TransformableNPCProfile.GetNameForVariant(), and Terraria.GameContent.Profiles.DefaultNPCProfile.GetNameForVariant().

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