Esempio n. 1
0
        public static ItemRarity GetRarity(this ItemDrop.ItemData itemData)
        {
            if (itemData.IsMagic())
            {
                return(itemData.GetMagicItem().Rarity);
            }
            else if (itemData.IsMagicCraftingMaterial())
            {
                return(itemData.GetCraftingMaterialRarity());
            }
            else if (itemData.IsRunestone())
            {
                return(itemData.GetRunestoneRarity());
            }

            throw new ArgumentException("itemData is not magic item, magic crafting material, or runestone");
        }