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 {
1894 {
1896 }
1897 string text = Lang.prefix[
prefix].Value;
1898 if (text == "")
1899 {
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....
int prefix
The current prefix applied to this item. Either a T:Terraria.ID.PrefixID entry or M:Terraria....
References Terraria.Item.Name, Terraria.Item.prefix, and Terraria.Lang.prefix.
Referenced by Terraria.GameContent.UI.Chat.ItemTagHandler.Parse().