/// <summary>
        /// Occurs when pressing the shop buttong
        /// </summary>
        /// <param name="npc">Npc who calls the event</param>
        /// <param name="target">Character who requires interaction</param>
        protected virtual void OnShop(BaseNPC npc, Character target)
        {
            //Open menu
            Common.Actions.OpenMenu(
                target, npc,
                _Shop,
                DialogType.Shop,
                npc.GetDialogButtons(target)
            );

            //Open shoplist
            _shoplist.Open(target, npc);
        }
        /// <summary>
        /// Occurs after showing the trader dialog.
        /// </summary>
        /// <param name="npc"></param>
        /// <param name="target"></param>
        protected virtual void OnTradeDialog(BaseNPC npc, Character target)
        {
            Common.Actions.OpenMenu(
                target, npc,
                _TradeDialog,
                DialogType.TradeItems,
                npc.GetDialogButtons(target)
            );

            _container.Open(target, npc);
        }
        /// <summary>
        /// Shows all special abillities.
        /// </summary>
        /// <param name="npc">Npc who calls the event</param>
        /// <param name="target">Character who requires interaction</param>
        protected virtual void OnSpecialAbillities(BaseNPC npc, Character target)
        {
            CommonDialogs.OpenSpecialSkillsDialog(target, Singleton.Database.GetAllLearnedSkills(target));
            //CommonFunctions.ShowDialog(target, npc, _OnSpecialAbillities, npc.GetDialogButtons(target));

            //Show dialog
            Common.Actions.OpenMenu(
                target, npc,
                _OnSpecialAbillities,
                DialogType.BookStore,
                npc.GetDialogButtons(target)
            );
        }
        /// <summary>
        /// Shows all a list of skillbooks.
        /// (uses shoppinglist object)
        /// </summary>
        /// <param name="npc">Npc who calls the event</param>
        /// <param name="target">Character who requires interaction</param>
        protected virtual void OnSkillbook(BaseNPC npc, Character target)
        {
            //Open bookstore
            _shoplist.Open(target, npc);

            //Show dialog
            Common.Actions.OpenMenu(
                target, npc,
                _OnSkillbook,
                DialogType.BookStore,
                npc.GetDialogButtons(target)
            );
        }
        /// <summary>
        /// Shows all available jobs
        /// </summary>
        /// <param name="npc">Npc who calls the event</param>
        /// <param name="target">Character who requires interaction</param>
        protected virtual void OnChangeJob(BaseNPC npc, Character target)
        {
            //Create the collection and show it
            JobChangeCollection.Create(target).Show(target);

            //Show dialog
            Common.Actions.OpenMenu(
                target, npc,
                _ChangeJob,
                DialogType.BookStore,
                npc.GetDialogButtons(target)
            );
        }
Пример #6
0
 /// <summary>
 /// Occurs when opening the WeaponChange menu
 /// </summary>
 /// <param name="npc">Npc who requires shows the menu</param>
 /// <param name="target">Character who requires interaction</param>
 protected virtual void OnChangeWeapon(BaseNPC npc, Character target)
 {
     Common.Actions.OpenMenu(target, npc,
         _WeaponChange,                  //Dialog script for weapon changing
         DialogType.Smith,               //Button function
         npc.GetDialogButtons(target)    //Dialog buttons
     );
 }
Пример #7
0
 /// <summary>
 /// Occurs when opening the RepairEquipment menu
 /// </summary>
 /// <param name="npc">Npc who requires shows the menu</param>
 /// <param name="target">Character who requires interaction</param>
 protected virtual void OnRepairEquipment(BaseNPC npc, Character target)
 {
     Common.Actions.OpenMenu(target, npc,
        _RepairEquipment,               //Dialog sceipt for equipment reparing
        DialogType.Smith,               //Button function
        npc.GetDialogButtons(target)    //Dialog buttons
        );
 }