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

            if (quest == null)
            {
                return;
            }

            if (response == 0x00)
            {
                SendSystemMessage(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.WhenGoodBrowniesGoBad.CheckPlayerAbortQuest.Text1"));
            }
            else
            {
                SendSystemMessage(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.WhenGoodBrowniesGoBad.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(WhenGoodBrowniesGoBad), player) <= 0)
            {
                return;
            }


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

            MasterKless.TurnTo(player);

            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    quest            = new WhenGoodBrowniesGoBad();
                    quest.QuestGiver = MasterKless;
                    quest.OfferQuest(player);
                }
                else
                {
                    if (quest.Step == 1 && quest.browniesKilled.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(WhenGoodBrowniesGoBad), player) <= 0)
                return;

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

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