Exemplo n.º 1
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)
        {
            CemmethsOrders quest = player.IsDoingQuest(typeof(CemmethsOrders)) as CemmethsOrders;

            if (quest == null)
            {
                return;
            }

            if (response == 0x00)
            {
                SendSystemMessage(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.CemmethsOrders.CheckPlayerAbortQuest.Text1"));
            }
            else
            {
                SendSystemMessage(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.CemmethsOrders.CheckPlayerAbortQuest.Text2", questTitle));
                quest.AbortQuest();
            }
        }
Exemplo n.º 2
0
        protected static void TalkToCemmethBudgwold(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 (CemmethBudgwold.CanGiveQuest(typeof(CemmethsOrders), player) <= 0)
            {
                return;
            }


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

            CemmethBudgwold.TurnTo(player);

            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    quest            = new CemmethsOrders();
                    quest.QuestGiver = CemmethBudgwold;
                    quest.OfferQuest(player);
                }
                else
                {
                    if (quest.Step == 1 && quest.SkeletonsKilled.IsAchieved && quest.DecayingGhoulsKilled.IsAchieved)
                    {
                        quest.ChooseRewards(player);
                    }
                }
            }
        }
Exemplo n.º 3
0
        protected static void TalkToCemmethBudgwold(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 (CemmethBudgwold.CanGiveQuest(typeof(CemmethsOrders), player) <= 0)
                return;

            CemmethsOrders quest = player.IsDoingQuest(typeof(CemmethsOrders)) as CemmethsOrders;
            CemmethBudgwold.TurnTo(player);

            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    quest = new CemmethsOrders();
                    quest.QuestGiver = CemmethBudgwold;
                    quest.OfferQuest(player);
                }
                else
                {
                    if (quest.Step == 1 && quest.SkeletonsKilled.IsAchieved && quest.DecayingGhoulsKilled.IsAchieved)
                    {
                        quest.ChooseRewards(player);
                    }
                }
            }
        }