示例#1
0
文件: Item.cs 项目: karliky/wowwow
 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;
 }
示例#2
0
文件: Item.cs 项目: karliky/wowwow
 void Deserialize( GenericReader gr, bool fake )
 {
     int version = gr.ReadInt();
     Guid = (UInt64)gr.ReadInt64();
     maxCount = gr.ReadInt();
 }