Merge pull request #1432 from mistzzt/fix-itemban
Fix an itemban issue due to localization
This commit is contained in:
commit
e43e4f1b6b
2 changed files with 3 additions and 3 deletions
|
|
@ -65,7 +65,7 @@ namespace TShockAPI.DB
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
database.Query("INSERT INTO ItemBans (ItemName, AllowedGroups) VALUES (@0, @1);",
|
database.Query("INSERT INTO ItemBans (ItemName, AllowedGroups) VALUES (@0, @1);",
|
||||||
TShock.Utils.GetItemByName(itemname)[0].Name, "");
|
itemname, "");
|
||||||
if (!ItemIsBanned(itemname, null))
|
if (!ItemIsBanned(itemname, null))
|
||||||
ItemBans.Add(new ItemBan(itemname));
|
ItemBans.Add(new ItemBan(itemname));
|
||||||
}
|
}
|
||||||
|
|
@ -81,7 +81,7 @@ namespace TShockAPI.DB
|
||||||
return;
|
return;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
database.Query("DELETE FROM ItemBans WHERE ItemName=@0;", TShock.Utils.GetItemByName(itemname)[0].Name);
|
database.Query("DELETE FROM ItemBans WHERE ItemName=@0;", itemname);
|
||||||
ItemBans.Remove(new ItemBan(itemname));
|
ItemBans.Remove(new ItemBan(itemname));
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
||||||
|
|
@ -879,7 +879,7 @@ namespace TShockAPI
|
||||||
(TShock.Itembans.ItemIsBanned(name, this) || !TShock.Config.AllowAllowedGroupsToSpawnBannedItems))
|
(TShock.Itembans.ItemIsBanned(name, this) || !TShock.Config.AllowAllowedGroupsToSpawnBannedItems))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
GiveItem(type,name,width,height,stack,prefix);
|
GiveItem(type, name, width, height, stack, prefix);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue