protected override void OnTarget(Mobile from, object targeted) { bool hasKnife = false; foreach (Item item in from.Backpack.Items) { if (item is BaseKnife) { hasKnife = true; } } if (hasKnife && targeted is PlayerMobile && !(targeted == from)) { Item v = new BloodVial(); from.AddToBackpack(v); m_Vial.Consume(); } else if (!hasKnife) { from.SendMessage("You are missing a knife."); } else { from.SendMessage("The blood evaporates upon hitting the vial."); } }
public InternalTarget(BloodVial vial) : base(2, false, TargetFlags.None) { m_Vial = vial; }