|
||
|
|||||||
| General Discussion General discussion for the RunUO community, all off-topic posts will be deleted. This forum is NOT FOR SUPPORT! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Guest
Posts: n/a
|
I was on the peak of creating this darn thing, and I was thinking - u gotta be a freak to create that many ReadSomething()... there probably aint not ReadMobile() method... and I was about to freak out but then BAM!!!! THERE IS!!!
THANK YOU WHOEVER U ARE, I FEEL LIKE MAKING LOVE TO YOU FOR HOURS AND HOURS AND HOURSS!!!!! |
|
|
|
#2 (permalink) |
|
Administrator
Join Date: Aug 2002
Location: Baltimore, MD
Age: 25
Posts: 4,868
|
There's also ReadMobileList, which you might find interesting....
__________________
Zippy, Razor Creator and RunUO Core Developer The RunUO Software Team "Intuition, like a flash of lightning, lasts only for a second. It generally comes when one is tormented by a difficult decipherment and when one reviews in his mind the fruitless experiments already tried. Suddenly the light breaks through and one finds after a few minutes what previous days of labor were unable to reveal." ~The Cryptonomicon |
|
|
|
|
|
#7 (permalink) |
|
Administrator
Join Date: Aug 2002
Location: Baltimore, MD
Age: 25
Posts: 4,868
|
Use WriteMobileList from GenericWriter :-)
__________________
Zippy, Razor Creator and RunUO Core Developer The RunUO Software Team "Intuition, like a flash of lightning, lasts only for a second. It generally comes when one is tormented by a difficult decipherment and when one reviews in his mind the fruitless experiments already tried. Suddenly the light breaks through and one finds after a few minutes what previous days of labor were unable to reveal." ~The Cryptonomicon |
|
|
|
|
|
#8 (permalink) |
|
Guest
Posts: n/a
|
lmao....
[code:1] public void Serialize( GenericWriter w ) { w.Write( Mobiles.Count ); for ( int i = 0; i < Mobiles.Count; i++ ) w.Write( (Mobile) Mobiles[i] ); } [/code:1] [code:1] public void Deserialize( GenericReader r ) { count = r.ReadInt(); for ( int i = 0; i < count; i++ ) Mobiles.Insert( 0, r.ReadMobile() ); }[/code:1] Isn't that pretty much the same? |
|
|
|
#9 (permalink) |
|
Forum Administrator
Join Date: Aug 2002
Posts: 2,850
|
Similar, ReadMobileList is like:
[code:1]int count = ReadInt(); ArrayList list = new ArrayList( count ); for ( int i = 0; i < count; ++i ) { Mobile m = ReadMobile(); if ( m != null ) list.Add( m ); } return list;[/code:1] |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|