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

◆ GivenOrTypeName

string Terraria.NPC.GivenOrTypeName
get

If this NPC has a given name, returns their given name; otherwise, returns their type name.

Definition at line 1450 of file NPC.cs.

1451 {
1452 get
1453 {
1454 if (!HasGivenName)
1455 {
1456 return TypeName;
1457 }
1458 return _givenName;
1459 }
1460 }
bool HasGivenName
Whether or not this NPC has a given name.
Definition NPC.cs:1445
string TypeName
The TYPE name of this NPC. Type names are the base titles given to any NPC, and are typically shared...
Definition NPC.cs:1421
string _givenName
Definition NPC.cs:606

Referenced by Terraria.GameContent.CoinLossRevengeSystem.CacheEnemy(), and Terraria.NPC.GetPartyHatColor().