Пример #1
0
        public void OnTarget(Mobile from, object obj)
        {
            if (!from.InRange(GetWorldLocation(), 5) || !from.InLOS(this))
            {
                from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
            }
            else if (obj is Corpse)
            {
                Corpse c = obj as Corpse;

                if (c.Carved)
                {
                    return;
                }

                if (c.Owner is PlayerMobile)
                {
                    ((ICarvable)obj).Carve(from, this);
                    c.PublicOverheadMessage(MessageType.Emote, 33, true, string.Format("*You see {0} steal the soul of {1}*", from.Name, c.Owner.Name));
                    from.PlaySound(0x19c);
                    from.PlaySound(20);
                    from.PlaySound(230);
                    Effects.SendLocationEffect(c.Location, c.Map, 0x37c4, 18, 15, 1);
                }
                else
                {
                    ((ICarvable)obj).Carve(from, this);
                }
            }
            else
            {
                from.SendAsciiMessage("You cannot use this on that");
            }
        }