This commit is contained in:
xavier@runuo.com 2013-05-07 19:19:24 +00:00
parent 10a21d850d
commit 110bd99e56
3 changed files with 336 additions and 89 deletions

View file

@ -3029,6 +3029,14 @@ namespace Server
}
}
private bool m_NoMoveHS;
public bool NoMoveHS
{
get { return m_NoMoveHS; }
set { m_NoMoveHS = value; }
}
public void ProcessDelta()
{
ItemDelta flags = m_DeltaFlags;
@ -3558,6 +3566,7 @@ namespace Server
eable.Free();
}
Point3D oldLoc = m_Location;
m_Location = value;
ReleaseWorldPackets();
@ -3569,7 +3578,7 @@ namespace Server
{
Mobile m = state.Mobile;
if ( m.CanSee( this ) && m.InRange( m_Location, GetUpdateRange( m ) ) )
if ( m.CanSee( this ) && m.InRange( m_Location, GetUpdateRange( m ) ) && ( !state.HighSeas || !m_NoMoveHS || ( m_DeltaFlags & ItemDelta.Update ) != 0 || !m.InRange( oldLoc, GetUpdateRange( m ) ) ) )
SendInfoTo( state );
}

View file

@ -9101,7 +9101,7 @@ namespace Server
if( m_Map != null )
m_Map.OnMove( oldLocation, this );
if( isTeleport && m_NetState != null )
if( isTeleport && m_NetState != null && ( !m_NetState.HighSeas || !m_NoMoveHS ) )
{
m_NetState.Sequence = 0;
@ -9164,7 +9164,7 @@ namespace Server
bool inOldRange = Utility.InUpdateRange( oldLocation, m.m_Location );
if( (isTeleport || !inOldRange) && m.m_NetState != null && m.CanSee( this ) )
if( m.m_NetState != null && ( ( isTeleport && ( !m.m_NetState.HighSeas || !m_NoMoveHS ) ) || !inOldRange ) && m.CanSee( this ) )
{
if ( m.m_NetState.StygianAbyss ) {
m.m_NetState.Send( new MobileIncoming( m, this ) );
@ -9227,7 +9227,7 @@ namespace Server
// We're not attached to a client, so simply send an Incoming
foreach( NetState ns in eable )
{
if( (isTeleport || !Utility.InUpdateRange( oldLocation, ns.Mobile.Location )) && ns.Mobile.CanSee( this ) )
if( ( ( isTeleport && ( !ns.HighSeas || !m_NoMoveHS ) ) || !Utility.InUpdateRange( oldLocation, ns.Mobile.Location )) && ns.Mobile.CanSee( this ) )
{
if ( ns.StygianAbyss ) {
ns.Send( new MobileIncoming( ns.Mobile, this ) );
@ -9935,6 +9935,14 @@ namespace Server
Core.Set();
}
private bool m_NoMoveHS;
public bool NoMoveHS
{
get { return m_NoMoveHS; }
set { m_NoMoveHS = value; }
}
#region GetDirectionTo[..]
public Direction GetDirectionTo( int x, int y )