Fix Sparklies in UOTD Client. ie, fix due to Client not sending uo:td in client version

This commit is contained in:
asayre 2007-01-02 08:46:15 +00:00
parent ed73ebfa3e
commit fc9e4d2be1
4 changed files with 11 additions and 4 deletions

View file

@ -54,7 +54,7 @@ namespace Server
public static bool SendParticlesTo( NetState state ) public static bool SendParticlesTo( NetState state )
{ {
return ( m_ParticleSupportType == ParticleSupportType.Full || (m_ParticleSupportType == ParticleSupportType.Detect && state.Version != null && state.Version.Type == ClientType.UOTD) ); return ( m_ParticleSupportType == ParticleSupportType.Full || (m_ParticleSupportType == ParticleSupportType.Detect && state.IsUOTDClient) );
} }
public static void PlaySound( IPoint3D p, Map map, int soundID ) public static void PlaySound( IPoint3D p, Map map, int soundID )

View file

@ -3120,7 +3120,7 @@ namespace Server
if( !InternalOnMove( d ) ) if( !InternalOnMove( d ) )
return false; return false;
if( m_FwdEnabled && m_NetState != null && m_AccessLevel < m_FwdAccessOverride && (!m_FwdUOTDOverride || (m_NetState.Version != null && m_NetState.Version.Type != ClientType.UOTD)) ) if( m_FwdEnabled && m_NetState != null && m_AccessLevel < m_FwdAccessOverride && (!m_FwdUOTDOverride || !m_NetState.IsUOTDClient) )
{ {
if( m_MoveRecords == null ) if( m_MoveRecords == null )
m_MoveRecords = new Queue<MovementRecord>( 6 ); m_MoveRecords = new Queue<MovementRecord>( 6 );

View file

@ -201,6 +201,14 @@ namespace Server.Network {
} }
} }
public bool IsUOTDClient
{
get
{
return ((m_Flags & 0x100) != 0 || (m_Version != null && m_Version.Type == ClientType.UOTD));
}
}
public List<SecureTrade> Trades { public List<SecureTrade> Trades {
get { get {
return m_Trades; return m_Trades;

View file

@ -1736,7 +1736,6 @@ namespace Server.Network
public static void ClientVersion( NetState state, PacketReader pvSrc ) public static void ClientVersion( NetState state, PacketReader pvSrc )
{ {
CV version = state.Version = new CV( pvSrc.ReadString() ); CV version = state.Version = new CV( pvSrc.ReadString() );
string kickMessage = null; string kickMessage = null;
if ( CV.Required != null && version < CV.Required ) if ( CV.Required != null && version < CV.Required )
@ -1749,7 +1748,7 @@ namespace Server.Network
kickMessage = "This server does not allow god clients to connect."; kickMessage = "This server does not allow god clients to connect.";
else if ( !CV.AllowRegular && version.Type == ClientType.Regular ) else if ( !CV.AllowRegular && version.Type == ClientType.Regular )
kickMessage = "This server does not allow regular clients to connect."; kickMessage = "This server does not allow regular clients to connect.";
else if ( !CV.AllowUOTD && version.Type == ClientType.UOTD ) else if ( !CV.AllowUOTD && state.IsUOTDClient )
kickMessage = "This server does not allow UO:TD clients to connect."; kickMessage = "This server does not allow UO:TD clients to connect.";
if ( !CV.AllowGod && !CV.AllowRegular && !CV.AllowUOTD ) if ( !CV.AllowGod && !CV.AllowRegular && !CV.AllowUOTD )