From 71352173155a582a773de735bd339e77aa7257f6 Mon Sep 17 00:00:00 2001 From: Enerdy Date: Sun, 20 Jul 2014 01:48:53 +0100 Subject: [PATCH] Fix Utils.GetPrefixById --- TShockAPI/Utils.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/TShockAPI/Utils.cs b/TShockAPI/Utils.cs index 37b95f58..bfe6c0c6 100644 --- a/TShockAPI/Utils.cs +++ b/TShockAPI/Utils.cs @@ -484,11 +484,7 @@ namespace TShockAPI /// Prefix name 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] ?? ""; } ///