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:
Kamron Batman 2020-11-01 21:33:01 -08:00 committed by GitHub
parent 55935d30b4
commit 6f5cb00cdd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 373 additions and 319 deletions

View file

@ -1,94 +0,0 @@
using Server.Network;
namespace Server
{
public class QuestArrow
{
public QuestArrow(Mobile m, Mobile t)
{
Running = true;
Mobile = m;
Target = t;
}
public QuestArrow(Mobile m, Mobile t, int x, int y) : this(m, t)
{
Update(x, y);
}
public Mobile 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;
}
var ns = Mobile.NetState;
if (ns == null)
{
return;
}
if (ns.HighSeas)
{
ns.Send(new SetArrowHS(x, y, Target.Serial));
}
else
{
ns.Send(new SetArrow(x, y));
}
}
public void Stop()
{
Stop(Target.X, Target.Y);
}
public void Stop(int x, int y)
{
if (!Running)
{
return;
}
Mobile.ClearQuestArrow();
var ns = Mobile.NetState;
if (ns != null)
{
if (ns.HighSeas)
{
ns.Send(new CancelArrowHS(x, y, Target.Serial));
}
else
{
ns.Send(new CancelArrow());
}
}
Running = false;
OnStop();
}
public virtual void OnStop()
{
}
public virtual void OnClick(bool rightClick)
{
}
}
}