コード例 #1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 3:
            {
                m_CatHue = reader.ReadInt();
                goto case 2;
            }

            case 2:
            {
                m_CatName = reader.ReadString();
                goto case 1;
            }

            case 1:
            {
                m_Cat = (PetCat)reader.ReadMobile();
                break;
            }
            }
        }
コード例 #2
0
        public void ConjureCat(Mobile from)
        {
            if (m_Cat != null && !m_Cat.Deleted)
            {
                return;
            }

            m_Cat = new PetCat();

            if (m_CatName != null && m_CatName.Length > 0)
            {
                m_Cat.Name = m_CatName;
            }

            m_Cat.MoveToWorld(from.Location, from.Map);
            m_Cat.Controlled    = true;
            m_Cat.ControlMaster = from;
            m_Cat.ControlOrder  = OrderType.Follow;
            m_Cat.ControlTarget = from;
            m_Cat.Hue           = m_CatHue;
            from.PlaySound(0x1d4);
            Timer.DelayCall(TimeSpan.FromMinutes(10), () =>
            {
                CageCat(from);
                Douse();
            });
        }
コード例 #3
0
        public void CageCat(Mobile from)
        {
            if (m_Cat != null && !m_Cat.Deleted)
            {
                m_CatName = m_Cat.Name;
                m_Cat.Delete();
                m_Cat = null;

                from.PlaySound(0x1d6);
            }
        }