parallel delta queue processing
thread safe packet construction, compilation, compression, gump compilation, sending, coalescing, and many other fixes TODO: delta queue recursion fixups, ipooledenumerable fixups/generics
This commit is contained in:
parent
9404651774
commit
ddcc4e7a20
16 changed files with 619 additions and 575 deletions
|
|
@ -1315,7 +1315,8 @@ namespace Server.Items
|
|||
|
||||
int inPack = 1;
|
||||
|
||||
foreach ( Mobile m in defender.GetMobilesInRange( 1 ) )
|
||||
IPooledEnumerable eable = defender.GetMobilesInRange( 1 );
|
||||
foreach ( Mobile m in eable )
|
||||
{
|
||||
if ( m != attacker && m is BaseCreature )
|
||||
{
|
||||
|
|
@ -1333,6 +1334,7 @@ namespace Server.Items
|
|||
++inPack;
|
||||
}
|
||||
}
|
||||
eable.Free();
|
||||
|
||||
if ( inPack >= 5 )
|
||||
return 100;
|
||||
|
|
@ -1365,7 +1367,8 @@ namespace Server.Items
|
|||
{
|
||||
Clone bc;
|
||||
|
||||
foreach ( Mobile m in defender.GetMobilesInRange( 4 ) )
|
||||
IPooledEnumerable eable = defender.GetMobilesInRange( 4 );
|
||||
foreach ( Mobile m in eable)
|
||||
{
|
||||
bc = m as Clone;
|
||||
|
||||
|
|
@ -1384,6 +1387,7 @@ namespace Server.Items
|
|||
break;
|
||||
}
|
||||
}
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
PlaySwingAnimation( attacker );
|
||||
|
|
@ -1912,11 +1916,13 @@ namespace Server.Items
|
|||
|
||||
int range = Core.ML ? 5 : 10;
|
||||
|
||||
foreach ( Mobile m in from.GetMobilesInRange( range ) )
|
||||
IPooledEnumerable eable = from.GetMobilesInRange(range);
|
||||
foreach ( Mobile m in eable )
|
||||
{
|
||||
if ( from != m && defender != m && SpellHelper.ValidIndirectTarget( from, m ) && from.CanBeHarmful( m, false ) && ( !Core.ML || from.InLOS( m ) ) )
|
||||
list.Add( m );
|
||||
}
|
||||
eable.Free();
|
||||
|
||||
if ( list.Count == 0 )
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -365,6 +365,8 @@ namespace Server.Misc
|
|||
}
|
||||
}
|
||||
|
||||
/* Must be thread-safe */
|
||||
|
||||
public static int MobileNotoriety( Mobile source, Mobile target )
|
||||
{
|
||||
if ( Core.AOS && ( target.Blessed || ( target is BaseCreature && ( (BaseCreature)target ).IsInvulnerable ) || target is PlayerVendor || target is TownCrier ) )
|
||||
|
|
|
|||
|
|
@ -2632,7 +2632,8 @@ namespace Server.Mobiles
|
|||
if (srcSkill <= 0)
|
||||
return;
|
||||
|
||||
foreach (Mobile trg in m_Mobile.GetMobilesInRange(m_Mobile.RangePerception))
|
||||
IPooledEnumerable eable = m_Mobile.GetMobilesInRange(m_Mobile.RangePerception);
|
||||
foreach (Mobile trg in eable)
|
||||
{
|
||||
if (trg != m_Mobile && trg.Player && trg.Alive && trg.Hidden && trg.AccessLevel == AccessLevel.Player && m_Mobile.InLOS(trg))
|
||||
{
|
||||
|
|
@ -2655,6 +2656,7 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
}
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
public virtual void Deactivate()
|
||||
|
|
|
|||
|
|
@ -5429,7 +5429,8 @@ namespace Server.Mobiles
|
|||
{
|
||||
Corpse toRummage = null;
|
||||
|
||||
foreach ( Item item in this.GetItemsInRange( 2 ) )
|
||||
IPooledEnumerable eable = this.GetItemsInRange(2);
|
||||
foreach ( Item item in eable )
|
||||
{
|
||||
if ( item is Corpse && item.Items.Count > 0 )
|
||||
{
|
||||
|
|
@ -5437,6 +5438,7 @@ namespace Server.Mobiles
|
|||
break;
|
||||
}
|
||||
}
|
||||
eable.Free();
|
||||
|
||||
if ( toRummage == null )
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -1210,27 +1210,17 @@ namespace Server.Mobiles
|
|||
m_IsStealthing = false; // IsStealthing should be moved to Server.Mobiles
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public override bool Hidden
|
||||
public override void OnHiddenChanged()
|
||||
{
|
||||
get
|
||||
RemoveBuff(BuffIcon.Invisibility); //Always remove, default to the hiding icon EXCEPT in the invis spell where it's explicitly set
|
||||
|
||||
if (!Hidden)
|
||||
{
|
||||
return base.Hidden;
|
||||
RemoveBuff(BuffIcon.HidingAndOrStealth);
|
||||
}
|
||||
set
|
||||
else// if( !InvisibilitySpell.HasTimer( this ) )
|
||||
{
|
||||
base.Hidden = value;
|
||||
|
||||
RemoveBuff( BuffIcon.Invisibility ); //Always remove, default to the hiding icon EXCEPT in the invis spell where it's explicitly set
|
||||
|
||||
if( !Hidden )
|
||||
{
|
||||
RemoveBuff( BuffIcon.HidingAndOrStealth );
|
||||
}
|
||||
else// if( !InvisibilitySpell.HasTimer( this ) )
|
||||
{
|
||||
BuffInfo.AddBuff( this, new BuffInfo( BuffIcon.HidingAndOrStealth, 1075655 ) ); //Hidden/Stealthing & You Are Hidden
|
||||
}
|
||||
BuffInfo.AddBuff(this, new BuffInfo(BuffIcon.HidingAndOrStealth, 1075655)); //Hidden/Stealthing & You Are Hidden
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -176,7 +176,8 @@ namespace Server.Regions
|
|||
{
|
||||
BaseGuard useGuard = null;
|
||||
|
||||
foreach ( Mobile m in focus.GetMobilesInRange( 8 ) )
|
||||
IPooledEnumerable eable = focus.GetMobilesInRange( 8 );
|
||||
foreach ( Mobile m in eable)
|
||||
{
|
||||
if ( m is BaseGuard )
|
||||
{
|
||||
|
|
@ -190,6 +191,8 @@ namespace Server.Regions
|
|||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
if ( useGuard == null )
|
||||
{
|
||||
m_GuardParams[0] = focus;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue