some ugly but necessary changes to support both pre and post 7.x clients
This commit is contained in:
parent
94d1a17b6f
commit
115e74f44e
6 changed files with 457 additions and 117 deletions
296
Server/Mobile.cs
296
Server/Mobile.cs
|
|
@ -1156,8 +1156,13 @@ namespace Server
|
|||
m_Aggressors.RemoveAt( i );
|
||||
info.Free();
|
||||
|
||||
if( m_NetState != null && this.CanSee( attacker ) && Utility.InUpdateRange( m_Location, attacker.m_Location ) )
|
||||
m_NetState.Send( new MobileIncoming( this, attacker ) );
|
||||
if( m_NetState != null && this.CanSee( attacker ) && Utility.InUpdateRange( m_Location, attacker.m_Location ) ) {
|
||||
if ( m_NetState.IsPost7000 ) {
|
||||
m_NetState.Send( new MobileIncoming( this, attacker ) );
|
||||
} else {
|
||||
m_NetState.Send( new MobileIncomingOld( this, attacker ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1176,8 +1181,13 @@ namespace Server
|
|||
m_Aggressed.RemoveAt( i );
|
||||
info.Free();
|
||||
|
||||
if( m_NetState != null && this.CanSee( defender ) && Utility.InUpdateRange( m_Location, defender.m_Location ) )
|
||||
m_NetState.Send( new MobileIncoming( this, defender ) );
|
||||
if( m_NetState != null && this.CanSee( defender ) && Utility.InUpdateRange( m_Location, defender.m_Location ) ) {
|
||||
if ( m_NetState.IsPost7000 ) {
|
||||
m_NetState.Send( new MobileIncoming( this, defender ) );
|
||||
} else {
|
||||
m_NetState.Send( new MobileIncomingOld( this, defender ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2375,8 +2385,13 @@ namespace Server
|
|||
{
|
||||
m_Aggressors.Add( AggressorInfo.Create( aggressor, this, criminal ) ); // new AggressorInfo( aggressor, this, criminal, true ) );
|
||||
|
||||
if( this.CanSee( aggressor ) && m_NetState != null )
|
||||
m_NetState.Send( new MobileIncoming( this, aggressor ) );
|
||||
if( this.CanSee( aggressor ) && m_NetState != null ) {
|
||||
if ( m_NetState.IsPost7000 ) {
|
||||
m_NetState.Send( new MobileIncoming( this, aggressor ) );
|
||||
} else {
|
||||
m_NetState.Send( new MobileIncomingOld( this, aggressor ) );
|
||||
}
|
||||
}
|
||||
|
||||
if( Combatant == null )
|
||||
setCombatant = true;
|
||||
|
|
@ -2388,8 +2403,13 @@ namespace Server
|
|||
{
|
||||
aggressor.m_Aggressed.Add( AggressorInfo.Create( aggressor, this, criminal ) ); // new AggressorInfo( aggressor, this, criminal, false ) );
|
||||
|
||||
if( this.CanSee( aggressor ) && m_NetState != null )
|
||||
m_NetState.Send( new MobileIncoming( this, aggressor ) );
|
||||
if( this.CanSee( aggressor ) && m_NetState != null ) {
|
||||
if ( m_NetState.IsPost7000 ) {
|
||||
m_NetState.Send( new MobileIncoming( this, aggressor ) );
|
||||
} else {
|
||||
m_NetState.Send( new MobileIncomingOld( this, aggressor ) );
|
||||
}
|
||||
}
|
||||
|
||||
if( Combatant == null )
|
||||
setCombatant = true;
|
||||
|
|
@ -2419,8 +2439,13 @@ namespace Server
|
|||
m_Aggressed.RemoveAt( i );
|
||||
info.Free();
|
||||
|
||||
if( m_NetState != null && this.CanSee( aggressed ) )
|
||||
m_NetState.Send( new MobileIncoming( this, aggressed ) );
|
||||
if( m_NetState != null && this.CanSee( aggressed ) ) {
|
||||
if ( m_NetState.IsPost7000 ) {
|
||||
m_NetState.Send( new MobileIncoming( this, aggressed ) );
|
||||
} else {
|
||||
m_NetState.Send( new MobileIncomingOld( this, aggressed ) );
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -2445,8 +2470,13 @@ namespace Server
|
|||
m_Aggressors.RemoveAt( i );
|
||||
info.Free();
|
||||
|
||||
if( m_NetState != null && this.CanSee( aggressor ) )
|
||||
m_NetState.Send( new MobileIncoming( this, aggressor ) );
|
||||
if( m_NetState != null && this.CanSee( aggressor ) ) {
|
||||
if ( m_NetState.IsPost7000 ) {
|
||||
m_NetState.Send( new MobileIncoming( this, aggressor ) );
|
||||
} else {
|
||||
m_NetState.Send( new MobileIncomingOld( this, aggressor ) );
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -2921,7 +2951,11 @@ namespace Server
|
|||
return true;
|
||||
}
|
||||
|
||||
private static Packet[] m_MovingPacketCache = new Packet[8];
|
||||
private static Packet[][] m_MovingPacketCache = new Packet[2][]
|
||||
{
|
||||
new Packet[8],
|
||||
new Packet[8]
|
||||
};
|
||||
|
||||
private bool m_Pushing;
|
||||
|
||||
|
|
@ -3148,11 +3182,6 @@ namespace Server
|
|||
|
||||
TimeSpan delay = ComputeMovementSpeed( d );
|
||||
|
||||
/*if ( Mounted )
|
||||
delay = ( d & Direction.Running ) != 0 ? m_RunMount : m_WalkMount;
|
||||
else
|
||||
delay = ( d & Direction.Running ) != 0 ? m_RunFoot : m_WalkFoot;*/
|
||||
|
||||
DateTime end;
|
||||
|
||||
if( m_MoveRecords.Count > 0 )
|
||||
|
|
@ -3205,10 +3234,11 @@ namespace Server
|
|||
|
||||
eable.Free();
|
||||
|
||||
Packet[] cache = m_MovingPacketCache;
|
||||
Packet[][] cache = m_MovingPacketCache;
|
||||
|
||||
for( int i = 0; i < cache.Length; ++i )
|
||||
Packet.Release( ref cache[i] );
|
||||
for( int j = 0; j < cache[i].Length; ++j )
|
||||
Packet.Release( ref cache[i][j] );
|
||||
|
||||
for( int i = 0; i < m_MoveList.Count; ++i )
|
||||
{
|
||||
|
|
@ -3221,11 +3251,21 @@ namespace Server
|
|||
|
||||
if( ns != null && Utility.InUpdateRange( m_Location, m.m_Location ) && m.CanSee( this ) )
|
||||
{
|
||||
int noto = Notoriety.Compute( m, this );
|
||||
Packet p = cache[noto];
|
||||
Packet p = null;
|
||||
|
||||
if( p == null )
|
||||
cache[noto] = p = Packet.Acquire( new MobileMoving( this, noto ) );
|
||||
if ( ns.IsPost7000 ) {
|
||||
int noto = Notoriety.Compute( m, this );
|
||||
p = cache[0][noto];
|
||||
|
||||
if( p == null )
|
||||
cache[0][noto] = p = Packet.Acquire( new MobileMoving( this, noto ) );
|
||||
} else {
|
||||
int noto = Notoriety.Compute( m, this );
|
||||
p = cache[1][noto];
|
||||
|
||||
if( p == null )
|
||||
cache[1][noto] = p = Packet.Acquire( new MobileMovingOld( this, noto ) );
|
||||
}
|
||||
|
||||
ns.Send( p );
|
||||
}
|
||||
|
|
@ -3239,7 +3279,8 @@ namespace Server
|
|||
}
|
||||
|
||||
for( int i = 0; i < cache.Length; ++i )
|
||||
Packet.Release( ref cache[i] );
|
||||
for( int j = 0; j < cache[i].Length; ++j )
|
||||
Packet.Release( ref cache[i][j] );
|
||||
|
||||
if( m_MoveList.Count > 0 )
|
||||
m_MoveList.Clear();
|
||||
|
|
@ -3257,10 +3298,12 @@ namespace Server
|
|||
{
|
||||
return ComputeMovementSpeed( this.Direction, false );
|
||||
}
|
||||
|
||||
public TimeSpan ComputeMovementSpeed( Direction dir )
|
||||
{
|
||||
return ComputeMovementSpeed( dir, true );
|
||||
}
|
||||
|
||||
public virtual TimeSpan ComputeMovementSpeed( Direction dir, bool checkTurning )
|
||||
{
|
||||
TimeSpan delay;
|
||||
|
|
@ -6676,14 +6719,16 @@ namespace Server
|
|||
|
||||
if( CanSee( m ) && Utility.InUpdateRange( m_Location, m.m_Location ) )
|
||||
{
|
||||
ns.Send( new MobileIncoming( this, m ) );
|
||||
|
||||
if ( ns.IsPost7000 ) {
|
||||
ns.Send( new MobileIncoming( this, m ) );
|
||||
|
||||
if ( m.Poisoned )
|
||||
ns.Send( new HealthbarPoison( m ) );
|
||||
|
||||
if ( m.Blessed || m.YellowHealthbar )
|
||||
ns.Send( new HealthbarYellow( m ) );
|
||||
} else {
|
||||
ns.Send( new MobileIncomingOld( this, m ) );
|
||||
}
|
||||
|
||||
if( m.IsDeadBondedPet )
|
||||
|
|
@ -6743,17 +6788,19 @@ namespace Server
|
|||
|
||||
NetState ns = m_NetState;
|
||||
|
||||
if( m_Map != null )
|
||||
if( ns != null && m_Map != null )
|
||||
{
|
||||
if( ns != null && m_Map != null )
|
||||
{
|
||||
ns.Sequence = 0;
|
||||
ns.Send( new MapChange( this ) );
|
||||
ns.Send( new MapPatches() );
|
||||
ns.Send( SeasonChange.Instantiate( GetSeason(), true ) );
|
||||
ns.Sequence = 0;
|
||||
ns.Send( new MapChange( this ) );
|
||||
ns.Send( new MapPatches() );
|
||||
ns.Send( SeasonChange.Instantiate( GetSeason(), true ) );
|
||||
|
||||
if ( ns.IsPost7000 )
|
||||
ns.Send( new MobileUpdate( this ) );
|
||||
ClearFastwalkStack();
|
||||
}
|
||||
else
|
||||
ns.Send( new MobileUpdateOld( this ) );
|
||||
|
||||
ClearFastwalkStack();
|
||||
}
|
||||
|
||||
if( ns != null )
|
||||
|
|
@ -6764,10 +6811,17 @@ namespace Server
|
|||
ns.Sequence = 0;
|
||||
ClearFastwalkStack();
|
||||
|
||||
Send( new MobileIncoming( this, this ) );
|
||||
Send( new MobileUpdate( this ) );
|
||||
CheckLightLevels( true );
|
||||
Send( new MobileUpdate( this ) );
|
||||
if ( ns.IsPost7000 ) {
|
||||
Send( new MobileIncoming( this, this ) );
|
||||
Send( new MobileUpdate( this ) );
|
||||
CheckLightLevels( true );
|
||||
Send( new MobileUpdate( this ) );
|
||||
} else {
|
||||
Send( new MobileIncomingOld( this, this ) );
|
||||
Send( new MobileUpdateOld( this ) );
|
||||
CheckLightLevels( true );
|
||||
Send( new MobileUpdateOld( this ) );
|
||||
}
|
||||
}
|
||||
|
||||
SendEverything();
|
||||
|
|
@ -6778,10 +6832,17 @@ namespace Server
|
|||
ns.Sequence = 0;
|
||||
ClearFastwalkStack();
|
||||
|
||||
Send( new MobileIncoming( this, this ) );
|
||||
Send( SupportedFeatures.Instantiate( ns ) );
|
||||
Send( new MobileUpdate( this ) );
|
||||
Send( new MobileAttributes( this ) );
|
||||
if ( ns.IsPost7000 ) {
|
||||
Send( new MobileIncoming( this, this ) );
|
||||
Send( SupportedFeatures.Instantiate( ns ) );
|
||||
Send( new MobileUpdate( this ) );
|
||||
Send( new MobileAttributes( this ) );
|
||||
} else {
|
||||
Send( new MobileIncomingOld( this, this ) );
|
||||
Send( SupportedFeatures.Instantiate( ns ) );
|
||||
Send( new MobileUpdateOld( this ) );
|
||||
Send( new MobileAttributes( this ) );
|
||||
}
|
||||
}
|
||||
|
||||
OnMapChange( oldMap );
|
||||
|
|
@ -7665,13 +7726,31 @@ namespace Server
|
|||
if( m_Female )
|
||||
flags |= 0x02;
|
||||
|
||||
if( m_NetState.IsPost7000 ) {
|
||||
if( m_Flying ) {
|
||||
flags |= 0x04;
|
||||
}
|
||||
} else if( m_Poison != null ) {
|
||||
if( m_Flying )
|
||||
flags |= 0x04;
|
||||
|
||||
if( m_Blessed || m_YellowHealthbar )
|
||||
flags |= 0x08;
|
||||
|
||||
if( m_Warmode )
|
||||
flags |= 0x40;
|
||||
|
||||
if( m_Hidden )
|
||||
flags |= 0x80;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
// Pre-7.0.0.0 Packet Flags
|
||||
public virtual int GetOldPacketFlags()
|
||||
{
|
||||
int flags = 0x0;
|
||||
|
||||
if( m_Female )
|
||||
flags |= 0x02;
|
||||
|
||||
if( m_Poison != null )
|
||||
flags |= 0x04;
|
||||
}
|
||||
|
||||
if( m_Blessed || m_YellowHealthbar )
|
||||
flags |= 0x08;
|
||||
|
|
@ -7789,7 +7868,10 @@ namespace Server
|
|||
}
|
||||
else
|
||||
{
|
||||
state.Send( new MobileIncoming( state.Mobile, this ) );
|
||||
if ( state.IsPost7000 )
|
||||
state.Send( new MobileIncoming( state.Mobile, this ) );
|
||||
else
|
||||
state.Send( new MobileIncomingOld( state.Mobile, this ) );
|
||||
|
||||
if( IsDeadBondedPet )
|
||||
state.Send( new BondedStatus( 0, m_Serial, 1 ) );
|
||||
|
|
@ -8799,7 +8881,12 @@ namespace Server
|
|||
ns.Send( new MapChange( this ) );
|
||||
ns.Send( new MapPatches() );
|
||||
ns.Send( SeasonChange.Instantiate( GetSeason(), true ) );
|
||||
ns.Send( new MobileUpdate( this ) );
|
||||
|
||||
if ( ns.IsPost7000 )
|
||||
ns.Send( new MobileUpdate( this ) );
|
||||
else
|
||||
ns.Send( new MobileUpdate( this ) );
|
||||
|
||||
ClearFastwalkStack();
|
||||
}
|
||||
}
|
||||
|
|
@ -8816,10 +8903,17 @@ namespace Server
|
|||
ns.Sequence = 0;
|
||||
ClearFastwalkStack();
|
||||
|
||||
Send( new MobileIncoming( this, this ) );
|
||||
Send( new MobileUpdate( this ) );
|
||||
CheckLightLevels( true );
|
||||
Send( new MobileUpdate( this ) );
|
||||
if ( ns.IsPost7000 ) {
|
||||
Send( new MobileIncoming( this, this ) );
|
||||
Send( new MobileUpdate( this ) );
|
||||
CheckLightLevels( true );
|
||||
Send( new MobileUpdate( this ) );
|
||||
} else {
|
||||
Send( new MobileIncomingOld( this, this ) );
|
||||
Send( new MobileUpdateOld( this ) );
|
||||
CheckLightLevels( true );
|
||||
Send( new MobileUpdateOld( this ) );
|
||||
}
|
||||
}
|
||||
|
||||
SendEverything();
|
||||
|
|
@ -8830,10 +8924,17 @@ namespace Server
|
|||
ns.Sequence = 0;
|
||||
ClearFastwalkStack();
|
||||
|
||||
Send( new MobileIncoming( this, this ) );
|
||||
Send( SupportedFeatures.Instantiate( ns ) );
|
||||
Send( new MobileUpdate( this ) );
|
||||
Send( new MobileAttributes( this ) );
|
||||
if ( ns.IsPost7000 ) {
|
||||
Send( new MobileIncoming( this, this ) );
|
||||
Send( SupportedFeatures.Instantiate( ns ) );
|
||||
Send( new MobileUpdate( this ) );
|
||||
Send( new MobileAttributes( this ) );
|
||||
} else {
|
||||
Send( new MobileIncomingOld( this, this ) );
|
||||
Send( SupportedFeatures.Instantiate( ns ) );
|
||||
Send( new MobileUpdateOld( this ) );
|
||||
Send( new MobileAttributes( this ) );
|
||||
}
|
||||
}
|
||||
|
||||
OnMapChange( oldMap );
|
||||
|
|
@ -8869,7 +8970,12 @@ namespace Server
|
|||
if( isTeleport && m_NetState != null )
|
||||
{
|
||||
m_NetState.Sequence = 0;
|
||||
m_NetState.Send( new MobileUpdate( this ) );
|
||||
|
||||
if ( m_NetState.IsPost7000 )
|
||||
m_NetState.Send( new MobileUpdate( this ) );
|
||||
else
|
||||
m_NetState.Send( new MobileUpdateOld( this ) );
|
||||
|
||||
ClearFastwalkStack();
|
||||
}
|
||||
|
||||
|
|
@ -8926,14 +9032,16 @@ namespace Server
|
|||
|
||||
if( (isTeleport || !inOldRange) && m.m_NetState != null && m.CanSee( this ) )
|
||||
{
|
||||
m.m_NetState.Send( new MobileIncoming( m, this ) );
|
||||
|
||||
if ( m.m_NetState.IsPost7000 ) {
|
||||
m.m_NetState.Send( new MobileIncoming( m, this ) );
|
||||
|
||||
if ( m_Poison != null )
|
||||
m.m_NetState.Send( new HealthbarPoison( this ) );
|
||||
|
||||
if ( m_Blessed || m_YellowHealthbar )
|
||||
m.m_NetState.Send( new HealthbarYellow( this ) );
|
||||
} else {
|
||||
m.m_NetState.Send( new MobileIncomingOld( m, this ) );
|
||||
}
|
||||
|
||||
if( IsDeadBondedPet )
|
||||
|
|
@ -8950,14 +9058,16 @@ namespace Server
|
|||
|
||||
if( !inOldRange && CanSee( m ) )
|
||||
{
|
||||
ourState.Send( new MobileIncoming( this, m ) );
|
||||
|
||||
if ( ourState.IsPost7000 ) {
|
||||
ourState.Send( new MobileIncoming( this, m ) );
|
||||
|
||||
if ( m.Poisoned )
|
||||
ourState.Send( new HealthbarPoison( m ) );
|
||||
|
||||
if ( m.Blessed || m.YellowHealthbar )
|
||||
ourState.Send( new HealthbarYellow( m ) );
|
||||
} else {
|
||||
ourState.Send( new MobileIncomingOld( this, m ) );
|
||||
}
|
||||
|
||||
if( m.IsDeadBondedPet )
|
||||
|
|
@ -8985,14 +9095,16 @@ namespace Server
|
|||
{
|
||||
if( (isTeleport || !Utility.InUpdateRange( oldLocation, ns.Mobile.Location )) && ns.Mobile.CanSee( this ) )
|
||||
{
|
||||
ns.Send( new MobileIncoming( ns.Mobile, this ) );
|
||||
|
||||
if ( ns.IsPost7000 ) {
|
||||
ns.Send( new MobileIncoming( ns.Mobile, this ) );
|
||||
|
||||
if ( m_Poison != null )
|
||||
ns.Send( new HealthbarPoison( this ) );
|
||||
|
||||
if ( m_Blessed || m_YellowHealthbar )
|
||||
ns.Send( new HealthbarYellow( this ) );
|
||||
} else {
|
||||
ns.Send( new MobileIncomingOld( ns.Mobile, this ) );
|
||||
}
|
||||
|
||||
if( IsDeadBondedPet )
|
||||
|
|
@ -9322,14 +9434,16 @@ namespace Server
|
|||
{
|
||||
if( state.Mobile.CanSee( this ) )
|
||||
{
|
||||
state.Send( new MobileIncoming( state.Mobile, this ) );
|
||||
|
||||
if ( state.IsPost7000 ) {
|
||||
state.Send( new MobileIncoming( state.Mobile, this ) );
|
||||
|
||||
if ( m_Poison != null )
|
||||
state.Send( new HealthbarPoison( this ) );
|
||||
|
||||
if ( m_Blessed || m_YellowHealthbar )
|
||||
state.Send( new HealthbarYellow( this ) );
|
||||
} else {
|
||||
state.Send( new MobileIncomingOld( state.Mobile, this ) );
|
||||
}
|
||||
|
||||
if( IsDeadBondedPet )
|
||||
|
|
@ -9852,12 +9966,13 @@ namespace Server
|
|||
sendFacialHair = true;
|
||||
}
|
||||
|
||||
Packet[] cache = m_MovingPacketCache;
|
||||
Packet[][] cache = m_MovingPacketCache;
|
||||
|
||||
if( sendMoving || sendNonlocalMoving )
|
||||
if( sendMoving || sendNonlocalMoving || sendHealthbarPoison || sendHealthbarYellow )
|
||||
{
|
||||
for( int i = 0; i < cache.Length; ++i )
|
||||
Packet.Release( ref cache[i] );
|
||||
for( int j = 0; j < cache[i].Length; ++j )
|
||||
Packet.Release( ref cache[i][j] );
|
||||
}
|
||||
|
||||
NetState ourState = m.m_NetState;
|
||||
|
|
@ -9867,18 +9982,23 @@ namespace Server
|
|||
if( sendUpdate )
|
||||
{
|
||||
ourState.Sequence = 0;
|
||||
ourState.Send( new MobileUpdate( m ) );
|
||||
|
||||
if ( ourState.IsPost7000 )
|
||||
ourState.Send( new MobileUpdate( m ) );
|
||||
else
|
||||
ourState.Send( new MobileUpdateOld( m ) );
|
||||
|
||||
ClearFastwalkStack();
|
||||
}
|
||||
|
||||
if( sendIncoming )
|
||||
ourState.Send( new MobileIncoming( m, m ) );
|
||||
|
||||
if ( ourState.IsPost7000 ) {
|
||||
if( sendIncoming )
|
||||
ourState.Send( new MobileIncoming( m, m ) );
|
||||
|
||||
if( sendMoving )
|
||||
{
|
||||
int noto = Notoriety.Compute( m, m );
|
||||
ourState.Send( cache[noto] = Packet.Acquire( new MobileMoving( m, noto ) ) );
|
||||
ourState.Send( cache[0][noto] = Packet.Acquire( new MobileMoving( m, noto ) ) );
|
||||
}
|
||||
|
||||
if ( sendHealthbarPoison )
|
||||
|
|
@ -9887,10 +10007,13 @@ namespace Server
|
|||
if ( sendHealthbarYellow )
|
||||
ourState.Send( new HealthbarYellow( m ) );
|
||||
} else {
|
||||
if( sendIncoming )
|
||||
ourState.Send( new MobileIncomingOld( m, m ) );
|
||||
|
||||
if( sendMoving || sendHealthbarPoison || sendHealthbarYellow )
|
||||
{
|
||||
int noto = Notoriety.Compute( m, m );
|
||||
ourState.Send( cache[noto] = Packet.Acquire( new MobileMoving( m, noto ) ) );
|
||||
ourState.Send( cache[1][noto] = Packet.Acquire( new MobileMovingOld( m, noto ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -9972,7 +10095,11 @@ namespace Server
|
|||
|
||||
if( sendIncoming )
|
||||
{
|
||||
state.Send( new MobileIncoming( beholder, m ) );
|
||||
if ( state.IsPost7000 ) {
|
||||
state.Send( new MobileIncoming( beholder, m ) );
|
||||
} else {
|
||||
state.Send( new MobileIncomingOld( beholder, m ) );
|
||||
}
|
||||
|
||||
if( m.IsDeadBondedPet )
|
||||
{
|
||||
|
|
@ -9988,10 +10115,10 @@ namespace Server
|
|||
{
|
||||
int noto = Notoriety.Compute( beholder, m );
|
||||
|
||||
Packet p = cache[noto];
|
||||
Packet p = cache[0][noto];
|
||||
|
||||
if( p == null )
|
||||
cache[noto] = p = Packet.Acquire( new MobileMoving( m, noto ) );
|
||||
cache[0][noto] = p = Packet.Acquire( new MobileMoving( m, noto ) );
|
||||
|
||||
state.Send( p );
|
||||
}
|
||||
|
|
@ -10013,10 +10140,10 @@ namespace Server
|
|||
{
|
||||
int noto = Notoriety.Compute( beholder, m );
|
||||
|
||||
Packet p = cache[noto];
|
||||
Packet p = cache[1][noto];
|
||||
|
||||
if( p == null )
|
||||
cache[noto] = p = Packet.Acquire( new MobileMoving( m, noto ) );
|
||||
cache[1][noto] = p = Packet.Acquire( new MobileMoving( m, noto ) );
|
||||
|
||||
state.Send( p );
|
||||
}
|
||||
|
|
@ -10093,7 +10220,8 @@ namespace Server
|
|||
if( sendMoving || sendNonlocalMoving || sendHealthbarPoison || sendHealthbarYellow )
|
||||
{
|
||||
for( int i = 0; i < cache.Length; ++i )
|
||||
Packet.Release( ref cache[i] );
|
||||
for( int j = 0; j < cache.Length; ++j )
|
||||
Packet.Release( ref cache[i][j] );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue