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;
            }

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

            sirDorian.TurnTo(player);

            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    quest = new DredgeUpAPledge();
                    quest.OfferQuest(player);
                }
                else
                {
                    if (quest.Step == 1 && quest.banditPledgesKilled.IsAchieved)
                    {
                        quest.ChooseRewards(player);
                    }
                }
            }
        }
        /* 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)
        {
            DredgeUpAPledge quest = player.IsDoingQuest(typeof(DredgeUpAPledge)) as DredgeUpAPledge;

            if (quest == null)
            {
                return;
            }

            if (response == 0x00)
            {
                SendSystemMessage(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.DredgeUpAPledge.CheckPlayerAbortQuest.Text1"));
            }
            else
            {
                SendSystemMessage(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.DredgeUpAPledge.CheckPlayerAbortQuest.Text2", questTitle));
                quest.AbortQuest();
            }
        }
Exemple #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;

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

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