some ugly but necessary changes to support both pre and post 7.x clients

This commit is contained in:
mark 2009-10-04 08:19:19 +00:00
parent 94d1a17b6f
commit 115e74f44e
6 changed files with 457 additions and 117 deletions

View file

@ -115,21 +115,28 @@ namespace Server.Commands
if ( Utility.InUpdateRange( targ, from ) )
{
if ( targ.CanSee( from ) )
{
targ.Send( new Network.MobileIncoming( targ, from ) );
NetState ns = targ.NetState;
if ( ObjectPropertyList.Enabled )
if ( ns != null ) {
if ( targ.CanSee( from ) )
{
targ.Send( from.OPLPacket );
if ( ns.IsPost7000 )
ns.Send( new MobileIncoming( targ, from ) );
else
ns.Send( new MobileIncomingOld( targ, from ) );
foreach ( Item item in from.Items )
targ.Send( item.OPLPacket );
if ( ObjectPropertyList.Enabled )
{
ns.Send( from.OPLPacket );
foreach ( Item item in from.Items )
ns.Send( item.OPLPacket );
}
}
else
{
ns.Send( from.RemovePacket );
}
}
else
{
targ.Send( from.RemovePacket );
}
}
}

View file

@ -117,7 +117,7 @@ namespace Server.Engines.Craft
int resIndex = ( context == null ? -1 : context.LastResourceIndex );
Type resourceType = craftSystem.CraftSubRes.ResType;
Type resourceType = craftSystem.CraftSubRes.ResType;
if ( resIndex > -1 )
{

View file

@ -3203,8 +3203,13 @@ namespace Server.Mobiles
{
Type t = m.GetType();
if ( t == oldType || t == newType )
Send( new MobileMoving( m, Notoriety.Compute( this, m ) ) );
if ( t == oldType || t == newType ) {
if ( this.NetState.IsPost7000 ) {
Send( new MobileMoving( m, Notoriety.Compute( this, m ) ) );
} else {
Send( new MobileMovingOld( m, Notoriety.Compute( this, m ) ) );
}
}
}
}
#endregion