Ejemplo n.º 1
0
        protected static void TalkToSirDorian(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;
            }

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

            sirDorian.TurnTo(player);

            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    quest = new NoHopeForTheHopeful();
                    quest.OfferQuest(player);
                }
                else
                {
                    if (quest.Step == 1 && quest.banditHopefulGoal.IsAchieved)
                    {
                        quest.ChooseRewards(player);
                    }
                }
            }
        }
Ejemplo n.º 2
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)
        {
            NoHopeForTheHopeful quest = player.IsDoingQuest(typeof(NoHopeForTheHopeful)) as NoHopeForTheHopeful;

            if (quest == null)
            {
                return;
            }

            if (response == 0x00)
            {
                SendSystemMessage(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.NoHopeForTheHopeful.CheckPlayerAbortQuest.Text1"));
            }
            else
            {
                SendSystemMessage(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.NoHopeForTheHopeful.CheckPlayerAbortQuest.Text2", questTitle));
                quest.AbortQuest();
            }
        }
Ejemplo n.º 3
0
        protected static void TalkToSirDorian(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;

            NoHopeForTheHopeful quest = player.IsDoingQuest(typeof(NoHopeForTheHopeful)) as NoHopeForTheHopeful;
            sirDorian.TurnTo(player);

            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    quest = new NoHopeForTheHopeful();
                    quest.OfferQuest(player);
                }
                else
                {
                    if (quest.Step == 1 && quest.banditHopefulGoal.IsAchieved)
                        quest.ChooseRewards(player);
                }
            }
        }