try to make 7.x clients not crash so much
This commit is contained in:
parent
1cc0064b24
commit
2e0b9e1670
2 changed files with 27 additions and 7 deletions
|
|
@ -4278,7 +4278,7 @@ namespace Server
|
|||
|
||||
foreach( NetState ns in eable )
|
||||
{
|
||||
if( ns.Mobile != from && ns.Mobile.CanSee( from ) )
|
||||
if( !ns.IsPost7000 && ns.Mobile != from && ns.Mobile.CanSee( from ) )
|
||||
{
|
||||
if( p == null )
|
||||
{
|
||||
|
|
@ -4413,7 +4413,7 @@ namespace Server
|
|||
|
||||
foreach( NetState ns in eable )
|
||||
{
|
||||
if( ns.Mobile != this && ns.Mobile.CanSee( this ) )
|
||||
if( !ns.IsPost7000 && ns.Mobile != this && ns.Mobile.CanSee( this ) )
|
||||
{
|
||||
if( p == null )
|
||||
{
|
||||
|
|
@ -6162,6 +6162,7 @@ namespace Server
|
|||
ProcessDelta();
|
||||
|
||||
Packet p = null;
|
||||
Packet pOld = null;
|
||||
|
||||
IPooledEnumerable eable = map.GetClientsInRange( m_Location );
|
||||
|
||||
|
|
@ -6171,14 +6172,22 @@ namespace Server
|
|||
{
|
||||
state.Mobile.ProcessDelta();
|
||||
|
||||
if( p == null )
|
||||
p = Packet.Acquire( new MobileAnimation( this, action, frameCount, repeatCount, forward, repeat, delay ) );
|
||||
if ( state.IsPost7000 ) {
|
||||
if( p == null )
|
||||
p = Packet.Acquire( new MobileAnimation( this, action, frameCount, delay ) );
|
||||
|
||||
state.Send( p );
|
||||
state.Send( p );
|
||||
} else {
|
||||
if( pOld == null )
|
||||
pOld = Packet.Acquire( new OldMobileAnimation( this, action, frameCount, repeatCount, forward, repeat, delay ) );
|
||||
|
||||
state.Send( pOld );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Packet.Release( p );
|
||||
Packet.Release( pOld );
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2713,9 +2713,9 @@ namespace Server.Network
|
|||
}
|
||||
}
|
||||
|
||||
public sealed class MobileAnimation : Packet
|
||||
public sealed class OldMobileAnimation : Packet
|
||||
{
|
||||
public MobileAnimation( Mobile m, int action, int frameCount, int repeatCount, bool forward, bool repeat, int delay ) : base( 0x6E, 14 )
|
||||
public OldMobileAnimation( Mobile m, int action, int frameCount, int repeatCount, bool forward, bool repeat, int delay ) : base( 0x6E, 14 )
|
||||
{
|
||||
m_Stream.Write( (int) m.Serial );
|
||||
m_Stream.Write( (short) action );
|
||||
|
|
@ -2726,6 +2726,17 @@ namespace Server.Network
|
|||
m_Stream.Write( (byte) delay );
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class MobileAnimation : Packet
|
||||
{
|
||||
public MobileAnimation( Mobile m, int action, int frameCount, int delay ) : base( 0xE2, 10 )
|
||||
{
|
||||
m_Stream.Write( (int) m.Serial );
|
||||
m_Stream.Write( (short) action );
|
||||
m_Stream.Write( (short) frameCount );
|
||||
m_Stream.Write( (byte) delay );
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class MobileStatusCompact : Packet
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue