/// <summary> /// Kills the given Mobile /// </summary> /// <param name="m">Mobile to kill</param> /// <param name="packToBank">true to move the Mobile's items to the bank</param> /// <param name="createTimedCorpse">true to create a temporary corpse</param> /// <param name="deleteCorpse">true to delete the Mobile's corpse after death</param> public virtual void Kill(Mobile m, bool packToBank, bool createTimedCorpse, bool deleteCorpse) { if (m == null) { return; } if (packToBank) { PackToBank(m); } if (createTimedCorpse) { _timedCorpse = new TimedItem(120.0, Utility.Random(0xECA, 8)); _timedCorpse.MoveToWorld(m.Location, m.Map); } m.Kill(); if (deleteCorpse && m.Corpse != null) { m.Corpse.Delete(); } }
public void Disintegrate(Mobile m) { TimedItem dust = new TimedItem(300.0, 0xF91); dust.Hue = 934; dust.Name = String.Format("the charred remains of {0}", m.RawName); dust.MoveToWorld(m.Location, m.Map); TimedItem scatterings = new TimedItem(300.0, 0xF35); scatterings.Hue = 934; scatterings.Name = "burnt dust scatterings"; scatterings.MoveToWorld(m.Location, m.Map); if (m.Body.IsHuman) { TimedItem gore = new TimedItem(300.0, Utility.Random(0x1D9F, 5)); gore.Hue = 1140; gore.Name = String.Format("a charred piece of {0}", m.RawName); gore.MoveToWorld(m.Location, m.Map); } Effects.PlaySound(m.Location, m.Map, 0x307); Effects.SendLocationEffect(m.Location, m.Map, 14000, 10, 934, 0); Kill(m, true, false, true); m.SendMessage("You have been disintegrated. All of your belongings have been placed in your bankbox."); }