From 5b03ef628e920be53bf8af66993ba9cf471a175d Mon Sep 17 00:00:00 2001 From: Mark Sturgill Date: Wed, 23 Oct 2013 21:42:33 -0700 Subject: [PATCH] drag effects have the potential to crash SA clients regardless of any location checking --- Server/Mobile.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Server/Mobile.cs b/Server/Mobile.cs index 63b691403..aca0f89fb 100644 --- a/Server/Mobile.cs +++ b/Server/Mobile.cs @@ -4498,9 +4498,10 @@ namespace Server IPooledEnumerable eable = map.GetClientsInRange(m_Location); Packet p = null; - bool sameLoc = false; + foreach(NetState ns in eable) { + if (ns.StygianAbyss) + continue; - foreach( NetState ns in eable ) { if( ns.Mobile != this && ns.Mobile.CanSee( this ) && ns.Mobile.InLOS( this ) && ns.Mobile.CanSee( root ) ) { if (p == null) { IEntity trg; @@ -4509,15 +4510,10 @@ namespace Server trg = new Entity(Serial.Zero, item.Location, map); else trg = new Entity(((Item)root).Serial, ((Item)root).Location, map); - - if (m_Location == trg.Location) - sameLoc = true; - += p = Packet.Acquire(new DragEffect(this, trg, item.ItemID, item.Hue, item.Amount)); } - if ( ns.StygianAbyss && sameLoc ) - continue; // prevents crash ns.Send( p ); } }