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!

[SVN 503]Stabled Pets Disappearing?

koluch

Sorceror
[SVN 503]Stabled Pets Disappearing?

I have had 3 players come to me and tell me they are missing pets out of the stable - one tamer lost 4 the other lost 6, both have the skill amount taming/lore/vet to have that many pets in the stable and they didn't lower any skills to lower the number they could have in the stable.
This appears to coincide with the addition of the DeleteTimer that was added in SVN 503 - though the delete timer deals with wild, pretamed, unstabled pets.

I have re-compared the scripts and can not find the issue :(

Has ANYONE else had this happen?

I have some unhappy tamers who lost pets they have had for years that were very well trained(man bonding kills everything, hehe)

These are all normal pets, we don't have any EVO thing or other custom - 2 nightmares, a rune beetle, a bake kitsune, a white whym, unicorn, eh you get the idea.

Any input on this would really be appreciated, I need to get this resolved before even more damage is done.

Thank you,

Koluch
 

Kamron

Knight
I have had 4 people come to me with missing pets.

One was missing half of his pets (a dragon), and others were missing everything. Another person is missing his nightmare and giant beetle.

I set up debugging for the basecreature destructor and OnDelete, and NONE of them trigger... but it continues to happen.

I take that back, I just checked my logs - NOBODY IS ON THE SERVER:

**** Stabled Pet Deleted: 0x0000061A Server.Mobiles.WhiteWyrm <---- THATS MY WHITEWYRM! :\

So it is catching it.... And it caught it on both OnDelete and BaseCreature destructor (2 hours apart). The question is, WHY.

EDIT: I have combed over EVERY LINE of RunUO SVN 503, both server and scripts... and I must be blind because I cannot find it.
And FYI: I have had this problem since around SVN 350. I believe though that pets are not the ONLY thing disappearing... keep your eyes out for decorations, spawners, etc.
 

HellRazor

Knight
Kamron;831077 said:
I have had 4 people come to me with missing pets.

One was missing half of his pets (a dragon), and others were missing everything. Another person is missing his nightmare and giant beetle.

I set up debugging for the basecreature destructor and OnDelete, and NONE of them trigger... but it continues to happen.

I take that back, I just checked my logs - NOBODY IS ON THE SERVER:

**** Stabled Pet Deleted: 0x0000061A Server.Mobiles.WhiteWyrm <---- THATS MY WHITEWYRM! :\

So it is catching it.... And it caught it on both OnDelete and BaseCreature destructor (2 hours apart). The question is, WHY.

EDIT: I have combed over EVERY LINE of RunUO SVN 503, both server and scripts... and I must be blind because I cannot find it.
And FYI: I have had this problem since around SVN 350. I believe though that pets are not the ONLY thing disappearing... keep your eyes out for decorations, spawners, etc.

Have you been able to establish any kind of pattern to this? Seems like its most likely that its happening when the server is doing clean-up for objects to be removed from the server.
 

Kamron

Knight
DeleteTimer.... thats where its happening....

BeginDeleteTimer() - does not check for !IsStabled. It seems like a very indirect method... so I am still investigating it.
 

JamzeMcC

Squire
Its been brought to my attention (again, however the first time I blew it off) that mounts are deleted too. Had a char not been on for 3 or 4 days and when they get back on, the mount is gone. I'll look for that deletetimer, hopefully thatll work. Im only using SVN 480 or so...
 

Kamron

Knight
Here is the problem... its a bunch of things:

First, if the DeleteTimer starts, there are cases where the timer is NOT stopped (such as setting the controlmaster in-game, using a [stable command, or stabling it at an animaltrainer).

Next, looking at this line in BaseCreature Deserialize:

Code:
if ( ( deleteTime > TimeSpan.Zero || LastOwner != null ) && !Controlled && !IsStabled )

IsStabled is NOT set... because a PlayerMobile who owns it might deserialize AFTER its pet. Therefore if the timer was never STOPPED, or if it had an owner (it was tamed, transferred, etc)...which is EVERY pet, then the delete timer will start again.
 

Kamron

Knight
okay to fix the problem, do the following:

Under the IsStabled property change it to this:

Code:
		[CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )]
		public bool IsStabled
		{
			get{ return m_IsStabled; }
			set
			{
				m_IsStabled = value;
				if ( m_IsStabled )
					StopDeleteTimer();
			}
		}

And I am a theoretical kind of guy.. and if someone decides to use BeginDeleteTimer() without paying attention, change it to this:

Code:
		public void BeginDeleteTimer()
		{
			if ( !(this is BaseEscortable) && !Summoned && !Deleted && !IsStabled )
			{
				StopDeleteTimer();
				m_DeleteTimer = new DeleteTimer( this, TimeSpan.FromDays( 3.0 ) );
				m_DeleteTimer.Start();
			}
		}

		public void StopDeleteTimer()
		{
			if ( m_DeleteTimer != null )
			{
				m_DeleteTimer.Stop();
				m_DeleteTimer = null;
			}
		}

To retroactively fix all mobs upon reboot look for this line:
Code:
			// Version 17
			writer.Write( DeleteTimeLeft );

and change it to this:

Code:
			// Version 17
			if ( IsStabled || ( Controlled && ControlMaster != null ) )
				writer.Write( TimeSpan.Zero );
			else
				writer.Write( DeleteTimeLeft );

Even though the Deserialize commands it to have a 3 day delete timer if its stabled (because of the serialization problem), the timer will STOP once IsStabled is set due to the code above.

under the ControlMaster Property, above this line:

Code:
				Delta( MobileDelta.Noto );

add this:

Code:
				if ( m_ControlMaster != null )
					StopDeleteTimer();

That should do it!!

EDIT: Please keep in mind that setting ControlMaster to null will NOT RE-ENABLE the delete timer again... you must release it using the same method players do.
 

koluch

Sorceror
Good deal:

Kamron;831120 said:
okay to fix the problem, do the following:

Under the IsStabled property change it to this:

Code:
		[CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )]
		public bool IsStabled
		{
			get{ return m_IsStabled; }
			set
			{
				m_IsStabled = value;
				if ( m_IsStabled )
					StopDeleteTimer();
			}
		}

And I am a theoretical kind of guy.. and if someone decides to use BeginDeleteTimer() without paying attention, change it to this:

Code:
		public void BeginDeleteTimer()
		{
			if ( !(this is BaseEscortable) && !Summoned && !Deleted && !IsStabled )
			{
				StopDeleteTimer();
				m_DeleteTimer = new DeleteTimer( this, TimeSpan.FromDays( 3.0 ) );
				m_DeleteTimer.Start();
			}
		}

		public void StopDeleteTimer()
		{
			if ( m_DeleteTimer != null )
			{
				m_DeleteTimer.Stop();
				m_DeleteTimer = null;
			}
		}

To retroactively fix all mobs upon reboot look for this line:
Code:
			// Version 17
			writer.Write( DeleteTimeLeft );

and change it to this:

Code:
			// Version 17
			if ( IsStabled || ( Controlled && ControlMaster != null ) )
				writer.Write( TimeSpan.Zero );
			else
				writer.Write( DeleteTimeLeft );

Even though the Deserialize commands it to have a 3 day delete timer if its stabled (because of the serialization problem), the timer will STOP once IsStabled is set due to the code above.

under the ControlMaster Property, above this line:

Code:
				Delta( MobileDelta.Noto );

add this:

Code:
				if ( m_ControlMaster != null )
					StopDeleteTimer();

That should do it!!

EDIT: Please keep in mind that setting ControlMaster to null will NOT RE-ENABLE the delete timer again... you must release it using the same method players do.

I added this to the Demise bug report, good catch, hopefully this will get implemented into the SVN.

**glad you got your WW back, hehe**

Koluch
(a.k.a. = Shazzy)
 
the day after

To everyone who installed this patch in his' shard:

what's the situation? Are you still experiencing deleted pets? Is there something strange to report?
 

koluch

Sorceror
osd_daedalus;831757 said:
To everyone who installed this patch in his' shard:

what's the situation? Are you still experiencing deleted pets? Is there something strange to report?

I installed this on Thursday, March 11th.
I have not done a restart, though that doesn't seem to be the issue with the deletion anyway. Pets were deleting while server was running.
SO FAR....I have had no one report a missing pet, but players get complacent. I will send an announcement out to have our players stable all the pets they can, check on them and report ASAP if any suddenly disappear.
Usually these guys are pretty good about helping out so things can get corrected AND Tamers have a vested interest in this, they know there is no way I can reset the pets skills :)

Koluch
 
Thank you Koluch for the useful info :)

Everyone please, continue monitoring the situation in your shard: in next week I will ask you to report if it's all OK or if there is something still broken.

Thank you for your continued support :)
 
2nd tier

This is another request of verification :)

If you have installed this patch, have you experienced in your shards issues with pets or other strange behaviours?
 

Kamron

Knight
I have tested it myself, because I reverted to a save file where my white wyrm was 1 hour from deletion. The way I coded it, when I rebooted with the fix I made, it did not enable the timer.

I also set it up to check DeleteTimeLeft and IsStabled in-game. Using the command [global get DeleteTimeLeft where basecreature isstabled true
I was able to monitor the situation. All stabled pets remained at a 00:00:00 time left (timer off).
 
approved, implemented

Very well Kamron, I have implemented your patch in SVN 506.

To everyone: please report immediately any issue related to it.

Thank you for your help :)
 
Top