From a1b906f9217a5f9464ccaf26abf78e67968d06a3 Mon Sep 17 00:00:00 2001 From: asayre Date: Sun, 26 Feb 2012 09:24:35 +0000 Subject: [PATCH] removing unused, buggy code. --- Scripts/Engines/Factions/Core/Reflector.cs | 46 ---------------------- 1 file changed, 46 deletions(-) diff --git a/Scripts/Engines/Factions/Core/Reflector.cs b/Scripts/Engines/Factions/Core/Reflector.cs index 68246c871..f174e58da 100644 --- a/Scripts/Engines/Factions/Core/Reflector.cs +++ b/Scripts/Engines/Factions/Core/Reflector.cs @@ -8,8 +8,6 @@ namespace Server.Factions { public class Reflector { - private static List m_Types = new List(); - private static List m_Towns; public static List Towns @@ -36,50 +34,6 @@ namespace Server.Factions } } - public static void Configure() - { - EventSink.WorldSave += new WorldSaveEventHandler( EventSink_WorldSave ); - } - - private static void EventSink_WorldSave( WorldSaveEventArgs e ) - { - m_Types.Clear(); - } - - public static void Serialize( GenericWriter writer, Type type ) - { - int index = m_Types.IndexOf( type ); - - writer.WriteEncodedInt( (int) (index + 1) ); - - if ( index == -1 ) - { - writer.Write( type == null ? null : type.FullName ); - m_Types.Add( type ); - } - } - - public static Type Deserialize( GenericReader reader ) - { - int index = reader.ReadEncodedInt(); - - if ( index == 0 ) - { - string typeName = reader.ReadString(); - - if ( typeName == null ) - m_Types.Add( null ); - else - m_Types.Add( ScriptCompiler.FindTypeByFullName( typeName, false ) ); - - return m_Types[m_Types.Count - 1]; - } - else - { - return m_Types[index - 1]; - } - } - private static object Construct( Type type ) { try{ return Activator.CreateInstance( type ); }