RarifyItem() public method

public RarifyItem ( ClientSession session, RarifyMode mode, RarifyProtection protection, bool isCommand = false ) : void
session ClientSession
mode RarifyMode
protection RarifyProtection
isCommand bool
return void
コード例 #1
0
        public void Rarify(ClientSession session)
        {
            ItemInstance instance = GetItemInstance();

            if (instance.Item.Type == InventoryType.Equipment && (instance.Item.ItemType == ItemType.Weapon || instance.Item.ItemType == ItemType.Armor))
            {
                WearableInstance wearableInstance = instance as WearableInstance;
                wearableInstance?.RarifyItem(session, RarifyMode.Drop, RarifyProtection.None);
            }
        }
コード例 #2
0
        public void Rarify(ClientSession session)
        {
            ItemInstance instance = GetItemInstance();

            if (instance.Item.EquipmentSlot == EquipmentType.Armor || instance.Item.EquipmentSlot == EquipmentType.MainWeapon ||
                instance.Item.EquipmentSlot == EquipmentType.SecondaryWeapon)
            {
                WearableInstance wearableInstance = instance as WearableInstance;
                wearableInstance?.RarifyItem(session, RarifyMode.Drop, RarifyProtection.None);
            }
        }