AAEmu/AAEmu

[BUG] Unable to recreate a character

Closed this issue · 8 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

  • Creating a character on a new account -> OK
  • Creation of a second character -> OK

BUT
When you delete an existing character, you cannot create another one.

Steps to reproduce

  • Create a character
  • delete it
  • try to create another one.

Expected behavior

Screenshots

Any additional context for this bug

melcosoft recently tested this feature, apparently they encountered this bug, the admin on the stream deleted and created characters on the same account

Well, my player got a "disconnected by the gods" error message.
I then tested myself locally, and I had the same problem. (see error file)

I've been trying to reproduce this error, but am unable to.
The error in the error.log suggests it fails to add the name to the NameManager because it's ID is already in use. Following the code logic, this should never be able to happen as character IDs are never released, they just get marked as deleted instead.

I reproduced this error however
I deleted my second character, and afterward I couldn't create another one (with a different name though)
My player was his main character, so no difference with my test.

The character was lvl 1 so normally no delay problem

I restored the deleted character (it work), and tried to create a new one (haranian mage) and it doesn't work for me. See the logs.
Error.log

PR #917 actually fixed this issue, but there were some steps missing for existing databases to prevent future corruptions like this.

  • Shut down your AAEmu.Game server

  • Run following MySQL query on the aaemu_game schema

-- Fix for failing to load Character IDs
TRUNCATE `slaves`;
DELETE FROM `doodads` WHERE `owner_type` = 2;
  • Start the game AAEmu.Game server