コード例 #1
0
            protected override void OnTick()
            {
                if (m_CorpseMinion.Deleted || DateTime.UtcNow >= m_End)
                {
                    Effects.SendLocationParticles(EffectItem.Create(m_CorpseMinion.Location, m_CorpseMinion.Map, EffectItem.DefaultDuration), 0x37CC, 1, 40, 97, 3, 9917, 0);
                    //m_CorpseMinion.FixedParticles(0x374A, 1, 15, 9502, 97, 3, (EffectLayer)255);
                    m_CorpseMinion.BodyValue = 776;

                    Effects.PlaySound(m_CorpseMinion.Location, m_CorpseMinion.Map, 1200);

                    m_CorpseMinion.IsTransformed = false;

                    m_CorpseMinion.PublicOverheadMessage(MessageType.Emote, 0, false, "the creature returns to its suppressed state");

                    Stop();

                    //cleanup
                    foreach (Item i in m_CorpseMinion.GetItemsInRange(4))
                    {
                        if (i is Corpse)
                        {
                            if (!i.Deleted && CorpseBookAtt.IsEmpty((Corpse)i))
                            {
                                Effects.SendLocationParticles(EffectItem.Create(i.Location, i.Map, EffectItem.DefaultDuration), 0x36B0, 1, 14, 63, 7, 9915, 0);
                                i.Delete();
                            }
                        }
                    }
                }
            }
コード例 #2
0
        public static void CorpseCheck(PlayerMobile pm)
        {
            Mobile m = (Mobile)pm;

            if (m.Backpack == null)
            {
                return;
            }

            //   Get CorpseBookAtt attachment
            CorpseBookAtt book = new CorpseBookAtt();

            // does player already have a CorpseBookAtt attachment?
            if (XmlAttach.FindAttachment(m, typeof(CorpseBookAtt)) == null)
            {
                // They do not have an attachment yet
                // Add the Attachment
                XmlAttach.AttachTo(m, book);
                book.Player = m;
                book.Update((Corpse)m.Corpse);
            }
            else
            {
                // they have the attachment just load their data
                book = (CorpseBookAtt)XmlAttach.FindAttachment(m, typeof(CorpseBookAtt));
                book.Update((Corpse)m.Corpse);
            }

            /*
             * CorpseBookAtt book = (CorpseBookAtt)(m.Backpack.FindItemByType(typeof(CorpseBookAtt)));
             *
             * if (book != null)
             *  book.Update((Corpse)m.Corpse);
             * else
             * {
             *  m.AddToBackpack(book = new CorpseBookAtt(m));
             *  book.Update((Corpse)m.Corpse);
             * }*/
        }
        public static void CorpseCheck(PlayerMobile pm)
        {
            Mobile m = (Mobile)pm;

            if (m.Backpack == null)
                return;

            //   Get CorpseBookAtt attachment 
            CorpseBookAtt book = new CorpseBookAtt();

            // does player already have a CorpseBookAtt attachment?
            if (XmlAttach.FindAttachment(m, typeof(CorpseBookAtt)) == null)
            {
                // They do not have an attachment yet
                // Add the Attachment
                XmlAttach.AttachTo(m, book);
                book.Player = m;
                book.Update((Corpse)m.Corpse);
            }
            else
            {
                // they have the attachment just load their data
                book = (CorpseBookAtt)XmlAttach.FindAttachment(m, typeof(CorpseBookAtt));
                book.Update((Corpse)m.Corpse);
            }
            /*
            CorpseBookAtt book = (CorpseBookAtt)(m.Backpack.FindItemByType(typeof(CorpseBookAtt)));

            if (book != null)
                book.Update((Corpse)m.Corpse);
            else
            {
                m.AddToBackpack(book = new CorpseBookAtt(m));
                book.Update((Corpse)m.Corpse);
            }*/
        }