This repository was archived by the owner on Sep 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathItemData.cs
More file actions
52 lines (44 loc) · 1.5 KB
/
ItemData.cs
File metadata and controls
52 lines (44 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#region Header
//-----------------------------------------------------------------
// Class: ItemData
// Description: Input item data for filter
// Author: Stridemann Date: 08.26.2017
//-----------------------------------------------------------------
#endregion
using PoeHUD.Models;
using PoeHUD.Models.Enums;
using PoeHUD.Poe.Components;
using PoeHUD.Poe.Elements;
using SharpDX;
namespace QvinExp
{
public class ItemData
{
public readonly NormalInventoryItem _inventoryItem;
public string Path { get; }
public string ClassName { get; }
public string BaseName { get; }
public ItemRarity Rarity { get; }
public int ItemQuality { get; }
public bool BIdentified { get; }
public int ItemLevel { get; }
public ItemData(NormalInventoryItem inventoryItem, BaseItemType baseItemType)
{
_inventoryItem = inventoryItem;
var item = inventoryItem.Item;
Path = item.Path;
var mods = item.GetComponent<Mods>();
Rarity = mods.ItemRarity;
BIdentified = mods.Identified;
ItemLevel = mods.ItemLevel;
var quality = item.GetComponent<Quality>();
ItemQuality = quality.ItemQuality;
ClassName = baseItemType.ClassName;
BaseName = baseItemType.BaseName;
}
public Vector2 GetClickPos()
{
return _inventoryItem.GetClientRect().Center;
}
}
}