Merge pull request #827 from Enerdy/general-devel
Fix Utils.GetPrefixById
This commit is contained in:
commit
a959b513c0
1 changed files with 1 additions and 5 deletions
|
|
@ -484,11 +484,7 @@ namespace TShockAPI
|
|||
/// <returns>Prefix name</returns>
|
||||
public string GetPrefixById(int id)
|
||||
{
|
||||
var item = new Item();
|
||||
item.SetDefaults(0);
|
||||
item.prefix = (byte) id;
|
||||
item.AffixName();
|
||||
return item.name.Trim();
|
||||
return id < FirstItemPrefix || id > LastItemPrefix ? "" : Lang.prefix[id] ?? "";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue