feat: get best trader offer for items
TODO: Make a better conversion for USD/EUR to RUB
This commit is contained in:
@@ -16,8 +16,23 @@ namespace LootValueEX.Extensions
|
||||
/// <param name="item">The item to check.</param>
|
||||
/// <returns>True if the item has been examined, false otherwise.</returns>
|
||||
internal static bool IsExamined(this Item? item) => item != null && ClientAppUtils.GetMainApp().GetClientBackEndSession().Profile.Examined(item);
|
||||
internal static bool IsStacked(this Item? item) => item != null && (item.StackObjectsCount > 1 || item.UnlimitedCount);
|
||||
internal static string PrehashTemplate(this Item? item) => string.Format("{0}|{1}|{2}", item?.TemplateId, item.GetDurability(), item.GetUses());
|
||||
|
||||
internal static Item? UnstackItem(this Item? item)
|
||||
{
|
||||
if (item == null)
|
||||
return null;
|
||||
|
||||
if (!item.IsStacked())
|
||||
return item;
|
||||
|
||||
Item? itemClone = item.CloneItem();
|
||||
itemClone.StackObjectsCount = 1;
|
||||
itemClone.UnlimitedCount = false;
|
||||
return itemClone;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the value of a specific attribute from an item.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user