Ejemplo n.º 1
0
        protected static void TalkToEpona(DOLEvent e, object sender, EventArgs args)
        {
            GamePlayer player = ((SourceEventArgs)args).Source as GamePlayer;

            if (player == null)
            {
                return;
            }

            SearchForKnowledge quest = player.IsDoingQuest(typeof(SearchForKnowledge)) as SearchForKnowledge;

            Epona.TurnTo(player);
            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    Epona.SayTo(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Hib.SearchForKnowledge.TalkToEpona"));
                }
                else
                {
                    if (quest.Step == 1)
                    {
                        quest.QuestGiver = Epona;
                        quest.ChooseRewards(player);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        protected static void TalkToBlercyn(DOLEvent e, object sender, EventArgs args)
        {
            // We get the player from the event arguments and check if he qualifies
            GamePlayer player = ((SourceEventArgs)args).Source as GamePlayer;

            if (player == null)
            {
                return;
            }

            if (Blercyn.CanGiveQuest(typeof(SearchForKnowledge), player) <= 0)
            {
                return;
            }

            SearchForKnowledge quest = player.IsDoingQuest(typeof(SearchForKnowledge)) as SearchForKnowledge;

            Blercyn.TurnTo(player);

            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    quest            = new SearchForKnowledge();
                    quest.QuestGiver = Blercyn;
                    quest.OfferQuest(player);
                }
            }
        }
Ejemplo n.º 3
0
        /* This is our callback hook that will be called when the player clicks
         * on any button in the quest offer dialog. We check if he accepts or
         * declines here...
         */

        private static void CheckPlayerAbortQuest(GamePlayer player, byte response)
        {
            SearchForKnowledge quest = player.IsDoingQuest(typeof(SearchForKnowledge)) as SearchForKnowledge;

            if (quest == null)
            {
                return;
            }

            if (response == 0x00)
            {
                SendSystemMessage(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Hib.SearchForKnowledge.CheckPlayerAbortQuest.Text1"));
            }
            else
            {
                SendSystemMessage(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Hib.SearchForKnowledge.CheckPlayerAbortQuest.Text2", questTitle));
                quest.AbortQuest();
            }
        }
Ejemplo n.º 4
0
        protected static void TalkToBlercyn(DOLEvent e, object sender, EventArgs args)
        {
            //We get the player from the event arguments and check if he qualifies
            GamePlayer player = ((SourceEventArgs)args).Source as GamePlayer;
            if (player == null)
                return;

            if (Blercyn.CanGiveQuest(typeof(SearchForKnowledge), player) <= 0)
                return;

            SearchForKnowledge quest = player.IsDoingQuest(typeof(SearchForKnowledge)) as SearchForKnowledge;
            Blercyn.TurnTo(player);

            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    quest = new SearchForKnowledge();
                    quest.QuestGiver = Blercyn;
                    quest.OfferQuest(player);
                }
            }
        }