protected FindersKeepers.Controller.Enums.ItemQuality Quality() { try { double Quality = ItemActor.GetAttribute(Enigma.D3.Enums.AttributeId.ItemQualityLevel); RealQuality = (FindersKeepers.Controller.Enums.ItemQuality)Quality; if (Quality < 3) { return(FindersKeepers.Controller.Enums.ItemQuality.Normal); } else if (Quality > 2 && Quality < 6) { return(FindersKeepers.Controller.Enums.ItemQuality.Magic); } else if (Quality > 5 && Quality < 9) { return(FindersKeepers.Controller.Enums.ItemQuality.Rare); } else if (Quality > 9) { return(FindersKeepers.Controller.Enums.ItemQuality.Legendary); } return((FindersKeepers.Controller.Enums.ItemQuality)Quality); } catch {} return(FindersKeepers.Controller.Enums.ItemQuality.Invalid); }
public Item(Enigma.D3.ActorCommonData Item) { this.ItemActor = Item; this.AncientItem = Item.GetAttribute(AttributeId.AncientRank) == 1; ItemQuality = Quality(); }