Changes properties to use automatic property initializers
This commit is contained in:
parent
f0a48ad431
commit
06fa31a7bf
623 changed files with 13072 additions and 19304 deletions
|
|
@ -24,59 +24,55 @@ namespace Server
|
|||
{
|
||||
public class QuestArrow
|
||||
{
|
||||
private Mobile m_Mobile;
|
||||
private Mobile m_Target;
|
||||
private bool m_Running;
|
||||
public Mobile Mobile { get; }
|
||||
|
||||
public Mobile Mobile => m_Mobile;
|
||||
public Mobile Target { get; }
|
||||
|
||||
public Mobile Target => m_Target;
|
||||
|
||||
public bool Running => m_Running;
|
||||
public bool Running { get; private set; }
|
||||
|
||||
public void Update()
|
||||
{
|
||||
Update( m_Target.X, m_Target.Y );
|
||||
Update( Target.X, Target.Y );
|
||||
}
|
||||
|
||||
public void Update( int x, int y )
|
||||
{
|
||||
if ( !m_Running )
|
||||
if ( !Running )
|
||||
return;
|
||||
|
||||
NetState ns = m_Mobile.NetState;
|
||||
NetState ns = Mobile.NetState;
|
||||
|
||||
if ( ns == null )
|
||||
return;
|
||||
|
||||
if ( ns.HighSeas )
|
||||
ns.Send( new SetArrowHS( x, y, m_Target.Serial ) );
|
||||
ns.Send( new SetArrowHS( x, y, Target.Serial ) );
|
||||
else
|
||||
ns.Send( new SetArrow( x, y ) );
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
Stop( m_Target.X, m_Target.Y );
|
||||
Stop( Target.X, Target.Y );
|
||||
}
|
||||
|
||||
public void Stop( int x, int y )
|
||||
{
|
||||
if ( !m_Running )
|
||||
if ( !Running )
|
||||
return;
|
||||
|
||||
m_Mobile.ClearQuestArrow();
|
||||
Mobile.ClearQuestArrow();
|
||||
|
||||
NetState ns = m_Mobile.NetState;
|
||||
NetState ns = Mobile.NetState;
|
||||
|
||||
if ( ns != null ) {
|
||||
if ( ns.HighSeas )
|
||||
ns.Send( new CancelArrowHS( x, y, m_Target.Serial ) );
|
||||
ns.Send( new CancelArrowHS( x, y, Target.Serial ) );
|
||||
else
|
||||
ns.Send( new CancelArrow() );
|
||||
}
|
||||
|
||||
m_Running = false;
|
||||
Running = false;
|
||||
OnStop();
|
||||
}
|
||||
|
||||
|
|
@ -90,9 +86,9 @@ namespace Server
|
|||
|
||||
public QuestArrow( Mobile m, Mobile t )
|
||||
{
|
||||
m_Running = true;
|
||||
m_Mobile = m;
|
||||
m_Target = t;
|
||||
Running = true;
|
||||
Mobile = m;
|
||||
Target = t;
|
||||
}
|
||||
|
||||
public QuestArrow( Mobile m, Mobile t, int x, int y ) : this( m, t )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue