Resolve runtime catalog items by typed keys
This commit is contained in:
parent
d2996bc072
commit
4891c7fafc
14 changed files with 34 additions and 52 deletions
|
|
@ -219,10 +219,7 @@ public class InventoryMenu : MonoBehaviour
|
|||
|
||||
private static AetheriaRuntimeCatalogItem FindTypedInventoryItem(ItemInstance item)
|
||||
{
|
||||
var itemId = item?.ItemId ?? Guid.Empty;
|
||||
return itemId == Guid.Empty
|
||||
? null
|
||||
: ActionGameManager.RuntimeCatalog?.FindItemByLegacyId(itemId.ToString("D"));
|
||||
return ActionGameManager.RuntimeCatalog?.FindItem(item?.ItemKey ?? "");
|
||||
}
|
||||
|
||||
private static int2 RotateTypedShapeCell(
|
||||
|
|
|
|||
|
|
@ -932,10 +932,7 @@ public class InventoryPanel : MonoBehaviour, IPointerClickHandler
|
|||
|
||||
private static AetheriaRuntimeCatalogItem FindTypedInventoryItem(ItemInstance item)
|
||||
{
|
||||
var itemId = item?.ItemId ?? Guid.Empty;
|
||||
return itemId == Guid.Empty
|
||||
? null
|
||||
: ActionGameManager.RuntimeCatalog?.FindItemByLegacyId(itemId.ToString("D"));
|
||||
return ActionGameManager.RuntimeCatalog?.FindItem(item?.ItemKey ?? "");
|
||||
}
|
||||
|
||||
public bool CanDropItem(ItemInstance item)
|
||||
|
|
|
|||
|
|
@ -393,13 +393,7 @@ public class TradeMenu : MonoBehaviour
|
|||
|
||||
private static AetheriaRuntimeCatalogItem FindTypedTradeItem(ItemInstance item)
|
||||
{
|
||||
var itemId = item?.ItemId ?? Guid.Empty;
|
||||
if (itemId == Guid.Empty)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return ActionGameManager.RuntimeCatalog?.FindItemByLegacyId(itemId.ToString("D"));
|
||||
return ActionGameManager.RuntimeCatalog?.FindItem(item?.ItemKey ?? "");
|
||||
}
|
||||
|
||||
private static double GetTypedBehaviorNumber(TradeRow row, BehaviorFilter behaviorFilter, AetheriaRuntimeBehaviorFieldMetadata field)
|
||||
|
|
@ -469,8 +463,6 @@ public class TradeMenu : MonoBehaviour
|
|||
|
||||
public AetheriaRuntimeCatalogItem TypedItem { get; }
|
||||
|
||||
public Guid LegacyId => Item?.ItemId ?? Guid.Empty;
|
||||
|
||||
public string ItemKey => Item?.ItemKey ?? "";
|
||||
|
||||
public string Name => !string.IsNullOrWhiteSpace(TypedItem?.Name) ? TypedItem.Name : "Unknown Item";
|
||||
|
|
|
|||
Loading…
Reference in a new issue