Exemplo n.º 1
0
 public static Item Load( GenericReader gr )
 {
     string cl = gr.ReadString();
     ConstructorInfo ct = Utility.FindConstructor( cl, Utility.externAsm[ "Items" ] );
     if ( ct == null )
     {
         Console.WriteLine( "Invalid item : {0}", cl );
         return null;
     }
     object o = ct.Invoke( null );
     if ( !( o is Item ) )
     {
         Console.WriteLine( "Invalid item : {0}", cl );
         return null;
     }
     Item s = (Item)o;
     s.Deserialize( gr, true );
     return s;
 }
Exemplo n.º 2
0
 void Deserialize( GenericReader gr, bool fake )
 {
     int version = gr.ReadInt();
     Guid = (UInt64)gr.ReadInt64();
     maxCount = gr.ReadInt();
 }