public ItemSlotPosition GetPosition(ItemType itemType, string modelName = "") { var key = ModelSlotPosition.CreateKey(itemType, modelName); if (ModelSlotPositionsSet.ContainsKey(key)) { return(ModelSlotPositionsSet[key].position); } else if (ItemTypePositions.ContainsKey(itemType)) { return(ItemTypePositions[itemType].position); } return(new ItemSlotPosition() { type = itemType, bone = defaultBone }); }
public ModelSlotPosition GetModelSlotPosition(Item item) { return(ModelSlotPositionsSet.TryGetValue(ModelSlotPosition.CreateKey(item), out var result) ? result : null); }