implement client bandage macro handler
fix non-opl paragon chest container property display
This commit is contained in:
parent
35372d1c8c
commit
893b42c3bf
4 changed files with 94 additions and 0 deletions
|
|
@ -18,6 +18,11 @@ namespace Server.Items
|
|||
get { return 0.1; }
|
||||
}
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
EventSink.BandageTargetRequest += new BandageTargetRequestEventHandler(EventSink_BandageTargetRequest);
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Bandage() : this( 1 )
|
||||
{
|
||||
|
|
@ -74,6 +79,37 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
private static void EventSink_BandageTargetRequest(BandageTargetRequestEventArgs e)
|
||||
{
|
||||
Bandage b = e.Bandage as Bandage;
|
||||
|
||||
if (b == null || b.Deleted)
|
||||
return;
|
||||
|
||||
Mobile from = e.Mobile;
|
||||
|
||||
if (from.InRange(b.GetWorldLocation(), Range))
|
||||
{
|
||||
Target t = from.Target;
|
||||
|
||||
if (t != null)
|
||||
{
|
||||
Target.Cancel(from);
|
||||
from.Target = null;
|
||||
}
|
||||
|
||||
from.RevealingAction();
|
||||
|
||||
from.SendLocalizedMessage(500948); // Who will you use the bandages on?
|
||||
|
||||
new InternalTarget(b).Invoke(from, e.Target);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(500295); // You are too far away to do that.
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private Bandage m_Bandage;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue