Skip to content

Commit

Permalink
Don't search for items with no name
Browse files Browse the repository at this point in the history
  • Loading branch information
electr0sheep committed Mar 22, 2022
1 parent f0058cf commit 593996a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ItemVendorLocation/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ private void OnItemTooltipOverride(ItemTooltip itemTooltip, ulong itemId)

private static bool IsItemSoldByAnyVendor(Lumina.Excel.GeneratedSheets.Item item)
{
return IsItemSoldByGilVendor(item) || IsItemSoldByGCVendor(item) || IsItemSoldBySpecialVendor(item);
return item.Name != null && item.Name != "" && (IsItemSoldByGilVendor(item) || IsItemSoldByGCVendor(item) || IsItemSoldBySpecialVendor(item));
}

private static bool IsItemSoldByGilVendor(Lumina.Excel.GeneratedSheets.Item item)
Expand Down Expand Up @@ -328,6 +328,8 @@ private void OpenContextMenuOverride(XivCommon.Functions.ContextMenu.ContextMenu
case "ItemSearch":
case "RecipeNote":
case "ShopExchangeItem":
case "ShopExchangeItemDialog":
case "Journal":
uint item_id = (uint)GameGui.HoveredItem;
selectedItem = DataManager.GetExcelSheet<Lumina.Excel.GeneratedSheets.Item>()!.GetRow(item_id)!;
if (IsItemSoldByAnyVendor(selectedItem))
Expand Down

0 comments on commit 593996a

Please sign in to comment.