public override void OnDoubleClick( Mobile from )
        {
            PlayerMobile pm = from as PlayerMobile;

            if ( pm != null && pm.InRange( GetWorldLocation(), 2 ) )
            {
                QuestSystem qs = pm.Quest;

                if ( qs is DarkTidesQuest )
                {
                    QuestObjective obj = qs.FindObjective( typeof( FindCallingScrollObjective ) );

                    if ( (obj != null && !obj.Completed) || DarkTidesQuest.HasLostCallingScroll( from ) )
                    {
                        Item scroll = new KronusScroll();

                        if ( pm.PlaceInBackpack( scroll ) )
                        {
                            pm.SendLocalizedMessage( 1060120, "", 0x41 ); // You rummage through the scrolls until you find the Scroll of Calling.  You quickly put it in your pack.

                            if ( obj != null && !obj.Completed )
                                obj.Complete();
                        }
                        else
                        {
                            pm.SendLocalizedMessage( 1060148, "", 0x41 ); // You were unable to take the scroll.
                            scroll.Delete();
                        }
                    }
                }
            }

            base.OnDoubleClick( from );
        }
Пример #2
0
        public override void OnDoubleClick(Mobile from)
        {
            if (from is PlayerMobile pm && pm.InRange(GetWorldLocation(), 2))
            {
                QuestSystem qs = pm.Quest;

                if (qs is DarkTidesQuest)
                {
                    QuestObjective obj = qs.FindObjective <FindCallingScrollObjective>();

                    if (obj?.Completed == false || DarkTidesQuest.HasLostCallingScroll(from))
                    {
                        Item scroll = new KronusScroll();

                        if (pm.PlaceInBackpack(scroll))
                        {
                            pm.SendLocalizedMessage(1060120, "",
                                                    0x41); // You rummage through the scrolls until you find the Scroll of Calling.  You quickly put it in your pack.

                            if (obj?.Completed == false)
                            {
                                obj.Complete();
                            }
                        }
                        else
                        {
                            pm.SendLocalizedMessage(1060148, "", 0x41); // You were unable to take the scroll.
                            scroll.Delete();
                        }
                    }
                }
            }

            base.OnDoubleClick(from);
        }
Пример #3
0
        public override void OnDoubleClick(Mobile from)
        {
            var pm = from as PlayerMobile;

            if (pm != null && pm.InRange(GetWorldLocation(), 2))
            {
                var qs = pm.Quest;

                if (qs is DarkTidesQuest)
                {
                    var obj = qs.FindObjective(typeof(FindCallingScrollObjective));

                    if ((obj != null && !obj.Completed) || DarkTidesQuest.HasLostCallingScroll(from))
                    {
                        Item scroll = new KronusScroll();

                        if (pm.PlaceInBackpack(scroll))
                        {
                            pm.SendLocalizedMessage(1060120, "", 0x41);
                            // You rummage through the scrolls until you find the Scroll of Calling.  You quickly put it in your pack.

                            if (obj != null && !obj.Completed)
                            {
                                obj.Complete();
                            }
                        }
                        else
                        {
                            pm.SendLocalizedMessage(1060148, "", 0x41); // You were unable to take the scroll.
                            scroll.Delete();
                        }
                    }
                }
            }

            base.OnDoubleClick(from);
        }