fBaseXtensions.XML.MoveToTownObjectTag.DialogIsVisible C# (CSharp) Method

DialogIsVisible() private method

private DialogIsVisible ( ) : bool
return bool
        private bool DialogIsVisible()
        {
            UIElement uie=null;

            switch (TownObject)
            {
                case TownObjects.Stash:
                    uie = Game.GameCache.ReturnTownRunObjectDialogElement(GameCache.TownRunBehavior.Stash);
                    break;
                case TownObjects.Sell:
                    uie = Game.GameCache.ReturnTownRunObjectDialogElement(GameCache.TownRunBehavior.Sell);
                    break;
                case TownObjects.Salvage:
                    uie = Game.GameCache.ReturnTownRunObjectDialogElement(GameCache.TownRunBehavior.Salvage);
                    break;
                case TownObjects.Gamble:
                    uie = Game.GameCache.ReturnTownRunObjectDialogElement(GameCache.TownRunBehavior.Gamble);
                    break;
                case TownObjects.NephalemObelisk:
                    uie = Game.GameCache.ReturnTownRunObjectDialogElement(GameCache.TownRunBehavior.NephalemObelisk);
                    break;
                case TownObjects.NephalemNPC:
                    uie = UI.Game.Conversation_Dialog_Main;
                    break;
                case TownObjects.Tyrael:
                    uie = UI.Game.Conversation_Selection_Dialog;
                    break;
            }

            if (uie == null)
            {
                if (!attemptedInteraction)
                {
                    attemptedInteraction = true;
                    return false;
                }
                return true;
            }

            return UI.ValidateUIElement(uie);
        }