public static void InvokeTargetedItemUse(TargetedItemUseEventArgs e) { if (TargetedItemUse != null) { TargetedItemUse(e); } }
private static void Targeted_Item(TargetedItemUseEventArgs e) { try { Item from = World.FindItem(e.Source.Serial); Mobile to = World.FindMobile(e.Target.Serial); Item toI = World.FindItem(e.Target.Serial); if (from != null) { if (to != null) { e.NetState.Mobile.TargetLocked = true; e.NetState.Mobile.Use(from); e.NetState.Mobile.Target.Invoke(e.NetState.Mobile, to); } else if (toI != null) { e.NetState.Mobile.TargetLocked = true; e.NetState.Mobile.Use(from); e.NetState.Mobile.Target.Invoke(e.NetState.Mobile, toI); } } } catch { } finally { e.NetState.Mobile.TargetLocked = false; } }
public static void InvokeTargetedItemUse(TargetedItemUseEventArgs e) { if (TargetedItemUse != null) TargetedItemUse(e); }