Fix duplicate statement

This commit is contained in:
ZIT WANG 2017-04-22 07:21:48 +08:00
parent 930607a142
commit 08d37eb6de
2 changed files with 10 additions and 7 deletions

View file

@ -25,8 +25,10 @@ namespace TShockAPI.Localization
try
{
if(!skip)
if (!skip)
{
LanguageManager.Instance.SetLanguage(GameCulture.English);
}
for (var i = -48; i < Main.maxItemTypes; i++)
{
@ -46,8 +48,10 @@ namespace TShockAPI.Localization
}
finally
{
if(!skip)
if (!skip)
{
LanguageManager.Instance.SetLanguage(culture);
}
}
}
@ -62,7 +66,7 @@ namespace TShockAPI.Localization
if (ItemNames.TryGetValue(id, out itemName))
return itemName;
return string.Empty;
return null;
}
/// <summary>
@ -76,7 +80,7 @@ namespace TShockAPI.Localization
if (NpcNames.TryGetValue(id, out npcName))
return npcName;
return string.Empty;
return null;
}
/// <summary>
@ -90,7 +94,7 @@ namespace TShockAPI.Localization
if (Prefixs.TryGetValue(id, out prefix))
return prefix;
return string.Empty;
return null;
}
}
}