Ejemplo n.º 1
0
        public static void SetAllowedItem(FindersKeepers.Helpers.Item Item, FilterItems Filter, bool ValidItem)
        {
            if ((!Config.Get <FKConfig>().General.FKSettings.DebugMode&& (Filter.OnlyAncient && !Item.AncientItem)))
            {
                return;
            }

            //if (!ValidItem) // Check this!! Not triggering in debug mode
            //  return;

            FKAccounts.Multibox Box = null;

            if (Filter.UseVoice)
            {
                SoundHelper.PlayVoice(Filter, Item);
            }

            else if (Filter.MultiboxSound)
            {
                SoundHelper.Play(Filter, GameManagerAccountHelper.CurrentData.Multibox.MultiboxID);
            }

            else if (Filter.SoundEnabled)
            {
                // SoundHelper.Play(Filter.SoundPath);

                if (Config.Get <FKConfig>().General.FKSettings.WriteToFile&& Item.ItemQuality == ItemQuality.Legendary)
                {
                    SoundHelper.OutputToFile(Item, GameManagerAccountHelper.CurrentData.Multibox.Nickname);
                }
            }

            Item.ShowAncient = Filter.ShowIfAncient;

            if (GameManager.Instance.GManager.GCache.Multiboxing)
            {
                if ((GameManagerAccountHelper.CurrentData.Multibox.Foreground != null && GameManagerAccountHelper.CurrentData.Multibox.TextColor != null) && GameManagerAccountHelper.CurrentData.Multibox.TextColor.Length > 0)
                {
                    Box = GameManagerAccountHelper.CurrentData.Multibox;
                }
            }

            if (Filter.OverlayIngame)
            {
                GameManager.Instance.GManager.GRef.D3OverlayControl.ItemOverlay.Add(
                    new OverlayItems {
                    Account    = Box,
                    Item       = new OverlayItems.SimpleItem(Item),
                    ItemType   = OverlayItems.Type.Item,
                    Transition = Filter.OverlayTimer
                });
            }
            //GameManager.Instance.GManager.GRef.ItemOverlay.Add(new OverlayItems { Account = Box, Item = new OverlayItems.SimpleItem(Item), ItemType = OverlayItems.Type.Item, Transition = Filter.OverlayTimer });
        }