Esempio n. 1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            reader.ReadInt(); // version

            Charm = reader.ReadItem() as DreamSerpentCharm;
        }
Esempio n. 2
0
        public override void OnAccept()
        {
            base.OnAccept();

            Charm = new DreamSerpentCharm();
            Owner.AddToBackpack(Charm);
        }
Esempio n. 3
0
        public override void RemoveQuest(bool removeChain)
        {
            base.RemoveQuest(removeChain);

            if (Charm != null && !Charm.Deleted)
            {
                Charm.Delete();
                Charm = null;
            }
        }
Esempio n. 4
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. 5
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)
            {
                var quest = QuestHelper.GetQuest <CatchMeIfYouCanQuest>((PlayerMobile)m);

                quest.Objectives[0].CurProgress = 0;
            }
        }
Esempio n. 6
0
        public static void CompleteQuest(Mobile m)
        {
            DreamSerpentCharm charm = m.Backpack.FindItemByType <DreamSerpentCharm>();

            TeleportFrom(m, charm, true);
        }