예제 #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)
        {
            WhenBloodSpeaks quest = player.IsDoingQuest(typeof(WhenBloodSpeaks)) as WhenBloodSpeaks;

            if (quest == null)
            {
                return;
            }

            if (response == 0x00)
            {
                SendSystemMessage(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.WhenBloodSpeaks.CheckPlayerAbortQuest.Text1"));
            }
            else
            {
                SendSystemMessage(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.WhenBloodSpeaks.CheckPlayerAbortQuest.Text2", questTitle));
                quest.AbortQuest();
            }
        }
예제 #2
0
        protected static void TalkToMasterKless(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 (MasterKless.CanGiveQuest(typeof(WhenBloodSpeaks), player) <= 0)
            {
                return;
            }


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

            MasterKless.TurnTo(player);

            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    quest            = new WhenBloodSpeaks();
                    quest.QuestGiver = MasterKless;
                    quest.OfferQuest(player);
                }
                else
                {
                    if (quest.Step == 1 && quest.spriggarnsKilled.IsAchieved)
                    {
                        quest.ChooseRewards(player);
                    }
                }
            }
        }
예제 #3
0
        protected static void TalkToMasterKless(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 (MasterKless.CanGiveQuest(typeof(WhenBloodSpeaks), player) <= 0)
                return;

            WhenBloodSpeaks quest = player.IsDoingQuest(typeof(WhenBloodSpeaks)) as WhenBloodSpeaks;
            MasterKless.TurnTo(player);

            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    quest = new WhenBloodSpeaks();
                    quest.QuestGiver = MasterKless;
                    quest.OfferQuest(player);
                }
                else
                {
                    if (quest.Step == 1 && quest.spriggarnsKilled.IsAchieved)
                    {
                        quest.ChooseRewards(player);
                    }
                }
            }
        }