Exemplo n.º 1
0
 public static void InvokeTargetedItemUse(TargetedItemUseEventArgs e)
 {
     if (TargetedItemUse != null)
     {
         TargetedItemUse(e);
     }
 }
Exemplo n.º 2
0
        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; }
        }
Exemplo n.º 3
0
 public static void InvokeTargetedItemUse(TargetedItemUseEventArgs e)
 {
     if (TargetedItemUse != null)
         TargetedItemUse(e);
 }