AAEmu/AAEmu

[BUG] Persistent slave doodads do not get loaded correctly is certain situations

Closed this issue · 6 comments

I confirm that:

  • I understand that if I do not agree to the following points by marking the checkboxes my issue will be ignored.
  • I have searched existing issues to see if the issue has already been opened, and I have checked the commit log to see if the issue has been resolved since my server was last updated.
  • I am currently on the latest commit of the branch when reporting this bug

Code branch that is affected by this issue

develop

Bug description

There was a problem with tractors in the latest revision of the server; when you try to call tractor ID 29900, ID 34314, it appears with an incorrect location and number of cargo boxes

Steps to reproduce

enter the game world as a character, summon tractor ID 29900, ID 34314, it will appear with the wrong number and location of cargo boxes.

Expected behavior

Screenshots

Bug_chariot_ID18660

Any additional context for this bug

Additional info:
There is a part in the SpawnPersistentDoodad function where it checks if the doodad location is on top of land. I suspect something is going wrong there as there isn't a check for the owner type in that piece of code. It's possible house and slave or owner Ids are getting mixed up.

It seems that vehicles given before the update (before last weekend's compilation) work correctly. My "Red farm hauler" ID 34314 work correctly.

I don’t understand anything, if I clean the database, everything starts to be displayed correctly. This is a serious mistake, which player would want to start all over again.

ScreenShot0000
ScreenShot0001

I compiled 04/28/2024.
Before compilation, vehicles worked fine.
I think the bug must be in an addition around that date.

After analyzing Shael's database data and restoring the now deleted Wagon, I think I know what happened.
It looks like slave item destruction is not working as intended, and not cleaning up all of it's child doodads/items correctly.
It's also not removing the actual slave entry either.
This has cause a overlap of IDs at some point, evidence for this is that the deleted slave data of the wagon was pointing to a item owned by somebody else. Because the owner didn't match it would end up creating more trade slots on spawn while still loading the old ones (ignoring wrong the linked owner to them)

That explains why a player got a pack with my name on it