fixed erroneous commit

This commit is contained in:
mark 2007-09-14 05:03:35 +00:00
parent 3a156a177b
commit 8aa1307afe

View file

@ -1,4 +1,3 @@
//07MAR2007 Update for Linux - seirge
/***************************************************************************
* Serialization.cs
* -------------------
@ -66,16 +65,10 @@ namespace Server
public abstract Item ReadItem();
public abstract Mobile ReadMobile();
public abstract BaseGuild ReadGuild();
#if MONO
public abstract T ReadItemG<T>() where T : Item;
public abstract T ReadMobileG<T>() where T : Mobile;
public abstract T ReadGuildG<T>() where T : BaseGuild;
#else
public abstract T ReadItem<T>() where T : Item;
public abstract T ReadMobile<T>() where T : Mobile;
public abstract T ReadGuild<T>() where T : BaseGuild;
#endif
public abstract ArrayList ReadItemList();
public abstract ArrayList ReadMobileList();
@ -986,192 +979,161 @@ namespace Server
{
return BaseGuild.Find( ReadInt() );
}
#if MONO
public override T ReadItemG<T>()
{
return ReadItem() as T;
}
#else
public override T ReadItem<T>()
{
return ReadItem() as T;
}
#endif
#if MONO
public override T ReadMobileG<T>()
{
return ReadMobile() as T;
}
#else
public override T ReadMobile<T>()
{
return ReadMobile() as T;
}
#endif
#if MONO
public override T ReadGuildG<T>()
{
return ReadGuild() as T;
}
#else
public override T ReadGuild<T>()
{
return ReadGuild() as T;
}
#endif
public override ArrayList ReadItemList()
{
int count = ReadInt();
ArrayList list = new ArrayList( count );
if ( count > 0 ) {
ArrayList list = new ArrayList( count );
for( int i = 0; i < count; ++i )
{
Item item = ReadItem();
for ( int i = 0; i < count; ++i ) {
Item item = ReadItem();
if( item != null )
list.Add( item );
if ( item != null ) {
list.Add( item );
}
}
return list;
} else {
return new ArrayList();
}
return list;
}
public override ArrayList ReadMobileList()
{
int count = ReadInt();
ArrayList list = new ArrayList( count );
if ( count > 0 ) {
ArrayList list = new ArrayList( count );
for( int i = 0; i < count; ++i )
{
Mobile m = ReadMobile();
for ( int i = 0; i < count; ++i ) {
Mobile m = ReadMobile();
if( m != null )
list.Add( m );
if ( m != null ) {
list.Add( m );
}
}
return list;
} else {
return new ArrayList();
}
return list;
}
public override ArrayList ReadGuildList()
{
int count = ReadInt();
ArrayList list = new ArrayList( count );
if ( count > 0 ) {
ArrayList list = new ArrayList( count );
for( int i = 0; i < count; ++i )
{
BaseGuild g = ReadGuild();
for ( int i = 0; i < count; ++i ) {
BaseGuild g = ReadGuild();
if( g != null )
list.Add( g );
if ( g != null ) {
list.Add( g );
}
}
return list;
} else {
return new ArrayList();
}
return list;
}
public override List<Item> ReadStrongItemList()
{
int count = ReadInt();
List<Item> list = new List<Item>( count );
for( int i = 0; i < count; ++i )
{
Item item = ReadItem();
if( item != null )
list.Add( item );
}
return list;
return ReadStrongItemList<Item>();
}
public override List<T> ReadStrongItemList<T>()
{
int count = ReadInt();
List<T> list = new List<T>( count );
if ( count > 0 ) {
List<T> list = new List<T>( count );
for( int i = 0; i < count; ++i )
{
T item = ReadItem() as T;
for ( int i = 0; i < count; ++i ) {
T item = ReadItem() as T;
if( item != null )
list.Add( item );
if ( item != null ) {
list.Add( item );
}
}
return list;
} else {
return new List<T>();
}
return list;
}
public override List<Mobile> ReadStrongMobileList()
{
int count = ReadInt();
List<Mobile> list = new List<Mobile>( count );
for( int i = 0; i < count; ++i )
{
Mobile m = ReadMobile();
if( m != null )
list.Add( m );
}
return list;
return ReadStrongMobileList<Mobile>();
}
public override List<T> ReadStrongMobileList<T>()
{
int count = ReadInt();
List<T> list = new List<T>( count );
if ( count > 0 ) {
List<T> list = new List<T>( count );
for( int i = 0; i < count; ++i )
{
T m = ReadMobile() as T;
for ( int i = 0; i < count; ++i ) {
T m = ReadMobile() as T;
if( m != null )
list.Add( m );
if ( m != null ) {
list.Add( m );
}
}
return list;
} else {
return new List<T>();
}
return list;
}
public override List<BaseGuild> ReadStrongGuildList()
{
int count = ReadInt();
List<BaseGuild> list = new List<BaseGuild>( count );
for( int i = 0; i < count; ++i )
{
BaseGuild g = ReadGuild();
if( g != null )
list.Add( g );
}
return list;
return ReadStrongGuildList<BaseGuild>();
}
public override List<T> ReadStrongGuildList<T>()
{
int count = ReadInt();
List<T> list = new List<T>( count );
if ( count > 0 ) {
List<T> list = new List<T>( count );
for( int i = 0; i < count; ++i )
{
T g = ReadGuild() as T;
for ( int i = 0; i < count; ++i ) {
T g = ReadGuild() as T;
if( g != null )
list.Add( g );
if ( g != null ) {
list.Add( g );
}
}
return list;
} else {
return new List<T>();
}
return list;
}
public override bool End()
@ -1752,5 +1714,4 @@ namespace Server
int SerialIdentity { get; }
void Serialize( GenericWriter writer );
}
}
}