From d197020a581dc94b186b49fa5e6ba0592a0f7412 Mon Sep 17 00:00:00 2001 From: eos Date: Sun, 22 Apr 2012 07:49:44 +0000 Subject: [PATCH] Fix for Arena region leak. --- Scripts/Engines/ConPVP/Arena.cs | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/Scripts/Engines/ConPVP/Arena.cs b/Scripts/Engines/ConPVP/Arena.cs index 5b42136d8..5ce7aa646 100644 --- a/Scripts/Engines/ConPVP/Arena.cs +++ b/Scripts/Engines/ConPVP/Arena.cs @@ -247,22 +247,12 @@ namespace Server.Engines.ConPVP m_Teleporter.Map = value; if ( m_Region != null ) - { - if ( m_Facet == null ) - { - m_Region.Unregister(); - m_Region = null; - } - else - { - m_Region = new SafeZone( m_Zone, m_Outside, m_Facet, m_IsGuarded ); - } - } + m_Region.Unregister(); + + if ( m_Zone.Start != Point2D.Zero && m_Zone.End != Point2D.Zero && m_Facet != null ) + m_Region = new SafeZone( m_Zone, m_Outside, m_Facet, m_IsGuarded ); else - { - if ( m_Zone.Start != Point2D.Zero && m_Zone.End != Point2D.Zero && m_Facet != null ) - m_Region = new SafeZone( m_Zone, m_Outside, m_Facet, m_IsGuarded ); - } + m_Region = null; } }