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
This commit is contained in:
parent
55935d30b4
commit
6f5cb00cdd
19 changed files with 373 additions and 319 deletions
68
Projects/UOContent/Skills/Tracking/QuestArrow.cs
Normal file
68
Projects/UOContent/Skills/Tracking/QuestArrow.cs
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
public class QuestArrow
|
||||
{
|
||||
public QuestArrow(PlayerMobile m, Mobile t)
|
||||
{
|
||||
Running = true;
|
||||
Mobile = m;
|
||||
Target = t;
|
||||
}
|
||||
|
||||
public QuestArrow(PlayerMobile m, Mobile t, int x, int y) : this(m, t)
|
||||
{
|
||||
Update(x, y);
|
||||
}
|
||||
|
||||
public PlayerMobile Mobile { get; }
|
||||
|
||||
public Mobile Target { get; }
|
||||
|
||||
public bool Running { get; private set; }
|
||||
|
||||
public void Update()
|
||||
{
|
||||
Update(Target.X, Target.Y);
|
||||
}
|
||||
|
||||
public void Update(int x, int y)
|
||||
{
|
||||
if (!Running)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Mobile.NetState?.SendSetArrow(x, y, Target.Serial);
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
Stop(Target.X, Target.Y);
|
||||
}
|
||||
|
||||
public void Stop(int x, int y)
|
||||
{
|
||||
if (!Running)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Mobile.ClearQuestArrow();
|
||||
Mobile.NetState?.SendCancelArrow(x, y, Target.Serial);
|
||||
|
||||
Running = false;
|
||||
OnStop();
|
||||
}
|
||||
|
||||
public virtual void OnStop()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void OnClick(bool rightClick)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue