drag effects have the potential to crash SA clients regardless of any location checking
This commit is contained in:
parent
28744d486e
commit
5b03ef628e
1 changed files with 4 additions and 8 deletions
|
|
@ -4498,9 +4498,10 @@ namespace Server
|
|||
IPooledEnumerable<NetState> 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 );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue