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

◆ AffixName()

string Terraria.Item.AffixName ( )
inline

Gets the localized name of this T:Terraria.Item including its prefix.

Returns
The localized name of this T:Terraria.Item including its prefix, or simply P:Terraria.Item.Name if the prefix doesn't exist or is an empty string.

Definition at line 1891 of file Item.cs.

1892 {
1893 if (prefix < 0 || prefix >= Lang.prefix.Length)
1894 {
1895 return Name;
1896 }
1897 string text = Lang.prefix[prefix].Value;
1898 if (text == "")
1899 {
1900 return Name;
1901 }
1902 if (text.StartsWith("("))
1903 {
1904 return Name + " " + text;
1905 }
1906 return text + " " + Name;
1907 }
string Name
The localized name of this item without stack size or prefixes. Can be overridden using M:Terraria....
Definition Item.cs:879
int prefix
The current prefix applied to this item. Either a T:Terraria.ID.PrefixID entry or M:Terraria....
Definition Item.cs:752

References Terraria.Item.Name, Terraria.Item.prefix, and Terraria.Lang.prefix.

Referenced by Terraria.GameContent.UI.Chat.ItemTagHandler.Parse().

+ Here is the caller graph for this function: