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!

Server trying to delete all my NPC's 1 at a time?

ArteGordon

Wanderer
Krystyl_Rose said:
ok then my system uses the TamingBOBFilter.cs, in fact it uses the one it is calling for.

so all I need to do then is change the deserialization back to this:

Code:
switch ( version )
			{
				case 20:
				{
					m_TamingBOBFilter = new Engines.BulkOrders.TamingBOBFilter( reader );
					goto case 19;
				}
				case 19:
				{
					m_Bioenginer = reader.ReadBool();
					NextTamingBulkOrder = reader.ReadTimeSpan();
					goto case 18;
				}

but remove the m_Bioenginer = from the m_Bioenginer = reader.ReadBool();

is this correct? (i wont hold you to it since you cant see my files *grin* ;) )


right. You need to read it, but you dont actually need to assign it to the m_Bioenginer variable.
 

Krystyl_Rose

Wanderer
ok I went and did all the changes and the shard loaded (YAY! Thank you SOOOOOOO Much!!) then I did a save, and now I am removing the deserialization stuff as you directed, however.... I removed the stuff in base creature without any trouble but the player mobile changes (the ones in the post just above this one) are more difficult for me to figure out...

Do I just remove the reader.ReadBool(); and leave the version? or does the version go down to 19 somehow? and if so..... how?
 

ArteGordon

Wanderer
Krystyl_Rose said:
ok I went and did all the changes and the shard loaded (YAY! Thank you SOOOOOOO Much!!) then I did a save, and now I am removing the deserialization stuff as you directed, however.... I removed the stuff in base creature without any trouble but the player mobile changes (the ones in the post just above this one) are more difficult for me to figure out...

Do I just remove the reader.ReadBool(); and leave the version? or does the version go down to 19 somehow? and if so..... how?

You just have to make the deser match the serialization exactly. The version number does go down to 19 because that is what you are now writing out in your serialization.

So if this is what you are writing

Code:
base.Serialize( writer );
			
			writer.Write( (int) 19 ); // version
			
			m_TamingBOBFilter.Serialize( writer );
			writer.Write( NextTamingBulkOrder );

			writer.WriteEncodedInt( (int) m_SolenFriendship );

then this is what you need to be reading.

Code:
base.Deserialize( reader );
			int version = reader.ReadInt();

			switch ( version )
			{
				case 19:
				{
					m_TamingBOBFilter = new Engines.BulkOrders.TamingBOBFilter( reader );
					NextTamingBulkOrder = reader.ReadTimeSpan();
					goto case 18;
				}
				case 18:
				{
					m_SolenFriendship = (SolenFriendship) reader.ReadEncodedInt();

					goto case 17;
				}
 

Krystyl_Rose

Wanderer
Thanks ArteGordon. I wish I could thank you enough for all the help you have given me...
but alas, I cant even give positive karma yet :p
 
Top