RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Deserialization hint

pooka01

Sorceror
I have an Item to pass as a deserialize, but i don't know what the reader takes,

Item m_HarvestItem = new Thing();
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
in the deserialize:
m_HarvestAmount = (int)reader.ReadInt();
m_HarvestItem = (Item)reader.Read'whatgoeshere'();

¯¯¯¯¯¯¯¯¯
I can't seem to find what i need to "read", i can do Int, Bool, but looks like class and object failed...
And i'm pretty sure can't do ReadItem as the genericreader is not made for uo...

I searched a bit on the FAQ's but found nothing interesting, so a little help on that would be appreciated.
 

Vorspire

Knight
GenericWriter and GenericReader are RunUO exclusive implementations.
They do support type generics to an extent.

C#:
Thing item = reader.ReadItem( ) as Thing;

Is equal to:

C#:
Thing item = reader.ReadItem<Thing>( );
 
Top