ModernUO/Projects/UOContent/Skills/Tracking/TrackArrow.cs
Kamron Batman 6f5cb00cdd
Updates Combat Packets & Moves Tracking to Content (#298)
- [X] Changes outgoing combat packets
- [X] Moves quest arrow to PlayerMobile and moves quest arrow packets to content.

Bumps release version
2020-11-01 21:33:01 -08:00

41 lines
940 B
C#

using Server.Mobiles;
namespace Server.SkillHandlers
{
public class TrackArrow : QuestArrow
{
private readonly Timer m_Timer;
private Mobile m_From;
public TrackArrow(PlayerMobile from, Mobile target, int range) : base(from, target)
{
m_From = from;
m_Timer = new TrackTimer(from, target, range, this);
m_Timer.Start();
}
public override void OnClick(bool rightClick)
{
if (rightClick)
{
Tracking.ClearTrackingInfo(m_From);
m_From = null;
Stop();
}
}
public override void OnStop()
{
m_Timer.Stop();
if (m_From != null)
{
Tracking.ClearTrackingInfo(m_From);
m_From.SendLocalizedMessage(503177); // You have lost your quarry.
}
}
}
}