Пример #1
0
        private bool ShouldCacheItem(TrinityItem cacheObject)
        {
            if (!cacheObject.IsPickupNoClick && TrinityCombat.Loot.IsBackpackFull)
            {
                cacheObject.AddCacheInfo("BackpackFull");
                return(false);
            }

            if (cacheObject.IsMyDroppedItem)
            {
                cacheObject.AddCacheInfo("DroppedItem");
                return(false);
            }

            if (cacheObject.IsUntargetable)
            {
                cacheObject.AddCacheInfo("Untargetable");
                return(false);
            }

            if (!cacheObject.IsCosmeticItem && cacheObject.ItemQualityLevel <= ItemQuality.Rare4 && cacheObject.Distance > 60f)
            {
                cacheObject.AddCacheInfo($"OutOfRange Limit={CharacterSettings.Instance.LootRadius}");
                return(false);
            }

            if (!TrinityCombat.Loot.ShouldPickup(cacheObject))
            {
                cacheObject.AddCacheInfo("LootProvider.ShouldPickup");
                return(false);
            }

            return(true);
        }
Пример #2
0
 private bool ShouldIncludeGold(TrinityItem cacheObject)
 {
     if (!Core.Settings.Items.PickupGold)
     {
         cacheObject.AddCacheInfo("GoldPickupDisabled");
         return(false);
     }
     if (cacheObject.GoldAmount < Core.Settings.Items.MinGoldStack)
     {
         cacheObject.AddCacheInfo("NotEnoughGold");
         return(false);
     }
     return(true);
 }