Пример #1
0
 public void ActivateSellMenu(ShopMenuController shopMenu, ShopDialog dialog)
 {
     this.shopMenu = shopMenu;
     this.dialog   = dialog;
     sellMenu.SetActive(true);
     sellMenuController.Activate(dialog);
     gameObject.SetActive(true);
 }
Пример #2
0
 public void ActivateBuyMenu(ShopMenuController shopMenu, ShopDialog dialog, Item[] merchToDisplay)
 {
     this.shopMenu = shopMenu;
     this.dialog   = dialog;
     buyMenu.SetActive(true);
     buyMenuController.Activate(dialog, merchToDisplay);
     gameObject.SetActive(true);
 }
Пример #3
0
 public void Activate(ShopDialog dialog, Item[] merchToDisplay)
 {
     this.dialog = dialog;
     UpdateMerch(merchToDisplay);
     buyButton.SetActive(true);
     gameObject.SetActive(true);
     merchDisplay.Init(this, merchToDisplay);
 }
Пример #4
0
 public void ToggleActionCanvas(bool flag, ShopDialog dialog)
 {
     actionCanvas.SetActive(flag);
     if (dialog != null)
     {
         this.dialog = dialog;
     }
     ToggleActionButtons(flag);
 }
Пример #5
0
        public override async Task Execute(IFieldObjUser user, NPCShopCommandArgs args)
        {
            var template = await _templates.Retrieve(args.TemplateID);

            if (template == null)
            {
                await user.Message($"The specified NPC Shop: {args.TemplateID}, does not exist.");

                return;
            }

            var shop = new ShopDialog(template.ID, template);

            await user.Dialog(shop);
        }
Пример #6
0
        private async Task GetUserInputAsync()
        {
            var categoryDialog  = new ShopDialog();
            var dialogViewModel = new ShopDialogViewModel(async instance =>
            {
                await dialogCoordinator.HideMetroDialogAsync(this, categoryDialog);
                if (!instance.Cancel)
                {
                    ProcessUserInput(instance.Shop);
                }
            });

            categoryDialog.DataContext = dialogViewModel;

            await dialogCoordinator.ShowMetroDialogAsync(this, categoryDialog);
        }
Пример #7
0
        private void HandleLeftClick()
        {
            bool mouseClicked = _currMouseState.LeftButton == ButtonState.Released &&
                                _prevMouseState.LeftButton == ButtonState.Pressed;

            if (mouseClicked && DrawArea.ContainsPoint(_currMouseState.X, _currMouseState.Y))
            {
                if (OldWorld.Instance.MainPlayer.ActiveCharacter.NeedsSpellTarget)
                {
                    var data = OldWorld.Instance.ESF[OldWorld.Instance.MainPlayer.ActiveCharacter.SelectedSpell];
                    if (data.TargetRestrict != SpellTargetRestrict.Friendly)
                    {
                        OldWorld.Instance.ActiveCharacterRenderer.SetSpellTarget(this);
                    }
                    else
                    {
                        //todo status label message "you cannot attack this NPC"
                        OldWorld.Instance.MainPlayer.ActiveCharacter.SelectSpell(-1);
                    }

                    return; //don't process regular click on NPC while targeting a spell
                }

                PacketAPI api = ((EOGame)Game).API;
                switch (NPC.Data.Type)
                {
                case NPCType.Shop: ShopDialog.Show(api, this); break;

                case NPCType.Inn: break;

                case NPCType.Bank: BankAccountDialog.Show(api, NPC.Index); break;

                case NPCType.Barber: break;

                case NPCType.Guild: break;

                case NPCType.Priest: break;

                case NPCType.Law: break;

                case NPCType.Skills: SkillmasterDialog.Show(api, NPC.Index); break;

                case NPCType.Quest: QuestDialog.Show(api, NPC.Index, NPC.Data.VendorID, NPC.Data.Name); break;
                }
            }
        }
Пример #8
0
 public void Activate(ShopDialog dialog)
 {
     this.dialog = dialog;
     sellButton.SetActive(true);
     gameObject.SetActive(true);
 }
Пример #9
0
    public void ShowShopDialog()
    {
        ShopDialog shopDialog = UIManager.Instance.OpenDialog(ShopDialog.DIALOG_ID) as ShopDialog;

        shopDialog.Initialize(_gameMap.GetShopStageData());
    }
Пример #10
0
 public void onClick()
 {
     ShopDialog.Init();
 }