Esempio n. 1
0
        public override void OnDoubleClick(Mobile m)
        {
            if (_NextUse > DateTime.UtcNow)
            {
                m.SendLocalizedMessage(1072529, string.Format("{0}\t{1}", ((int)(_NextUse - DateTime.UtcNow).TotalSeconds).ToString(), "seconds"));
            }
            else if (m is PlayerMobile mobile)
            {
                CatchMeIfYouCanQuest quest = QuestHelper.GetQuest <CatchMeIfYouCanQuest>(mobile);

                if (quest != null && SpellHelper.CheckCanTravel(mobile) && _Timer == null && WarpBounds.Contains(mobile.Location))
                {
                    TeleportTo(mobile);
                }
            }
        }
Esempio n. 2
0
        public override int Damage(int amount, Mobile from, bool informMount, bool checkDisrupt)
        {
            if (from is PlayerMobile)
            {
                CatchMeIfYouCanQuest quest = QuestHelper.GetQuest <CatchMeIfYouCanQuest>((PlayerMobile)from);

                if (quest != null)
                {
                    quest.Objectives[0].Update(this);

                    if (quest.Completed)
                    {
                        DreamSerpentCharm.CompleteQuest(from);
                    }
                }
            }

            return(0);
        }
Esempio n. 3
0
        public static void TeleportFrom(Mobile m, DreamSerpentCharm charm, bool completeQuest)
        {
            BaseCreature.TeleportPets(m, new Point3D(662, 3819, -43), Map.TerMur);
            m.MoveToWorld(new Point3D(662, 3819, -43), Map.TerMur);
            m.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);

            if (charm._Timer != null)
            {
                charm._Timer.Stop();
                charm._Timer = null;
            }

            charm._NextUse = DateTime.UtcNow + Cooldown;

            if (!completeQuest && m is PlayerMobile mobile)
            {
                CatchMeIfYouCanQuest quest = QuestHelper.GetQuest <CatchMeIfYouCanQuest>(mobile);

                quest.Objectives[0].CurProgress = 0;
            }
        }