コード例 #1
0
ファイル: ToReachTheBreach.cs プロジェクト: JVirant/DOLSharp
        private static void CheckPlayerAbortQuest(GamePlayer player, byte response)
        {
            ToReachTheBreach quest = player.IsDoingQuest(typeof(ToReachTheBreach)) as ToReachTheBreach;

            if (quest == null)
            {
                return;
            }

            if (response == 0x00)
            {
                SendSystemMessage(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Hib.ToReachTheBreach.CheckPlayerAbortQuest.Text1"));
            }
            else
            {
                SendSystemMessage(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Hib.ToReachTheBreach.CheckPlayerAbortQuest.Text2", questTitle));
                quest.AbortQuest();
            }
        }
コード例 #2
0
ファイル: ToReachTheBreach.cs プロジェクト: JVirant/DOLSharp
        protected static void PlayerEnterDemonBreachArea(DOLEvent e, object sender, EventArgs args)
        {
            AreaEventArgs aargs  = args as AreaEventArgs;
            GamePlayer    player = aargs.GameObject as GamePlayer;

            if (player == null)
            {
                return;
            }
            if (player.IsDoingQuest(typeof(ToReachTheBreach)) == null)
            {
                return;
            }

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

            if (quest.Step == 1 && quest.FoundBreach.IsAchieved == false)
            {
                quest.FoundBreach.Advance();
                return;
            }
        }
コード例 #3
0
ファイル: ToReachTheBreach.cs プロジェクト: JVirant/DOLSharp
        protected static void TalkToRichael(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 (Richael.CanGiveQuest(typeof(ToReachTheBreach), player) <= 0)
            {
                return;
            }


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

            Richael.TurnTo(player);

            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    quest            = new ToReachTheBreach();
                    quest.QuestGiver = Richael;
                    quest.OfferQuest(player);
                }
                else
                {
                    if (quest.Step == 1 && quest.FoundBreach.IsAchieved)
                    {
                        quest.ChooseRewards(player);
                    }
                }
            }
        }
コード例 #4
0
ファイル: ToReachTheBreach.cs プロジェクト: mynew4/DAoC
        protected static void TalkToRichael(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 (Richael.CanGiveQuest(typeof(ToReachTheBreach), player) <= 0)
                return;

            ToReachTheBreach quest = player.IsDoingQuest(typeof(ToReachTheBreach)) as ToReachTheBreach;
            Richael.TurnTo(player);

            if (e == GameObjectEvent.Interact)
            {
                if (quest == null)
                {
                    quest = new ToReachTheBreach();
                    quest.QuestGiver = Richael;
                    quest.OfferQuest(player);
                }
                else
                {
                    if (quest.Step == 1 && quest.FoundBreach.IsAchieved)
                    {
                        quest.ChooseRewards(player);
                    }
                }
            }
        }