public virtual Result <bool> Equip(IEquippableItemInstance item, int amount = 1) { var equipped = equippableCharacter.Equip(item, amount); if (equipped.error == null) { var mountPoint = GetMountPoint(item); mountPoint?.Clear(); mountPoint?.Mount(item); } return(equipped); }
public virtual Result <EquipmentResult <IEquippableItemInstance>[]> Equip(IEquippableItemInstance item, int amount = 1) { var equipped = equippableCharacter.Equip(item, amount); if (equipped.error == null) { foreach (var result in equipped.result) { var mountPoint = GetMountPoint(result.equippedItem); result.mountPoint = mountPoint?.name ?? ""; mountPoint?.Clear(); mountPoint?.Mount(item); } } return(equipped); }