Project 1999

Go Back   Project 1999 > General Community > Technical Discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 11-06-2021, 08:26 PM
TercerRigo TercerRigo is offline
Orc

TercerRigo's Avatar

Join Date: Jan 2015
Posts: 34
Default

I'm the sort of person that wants to be 100% sure, so I looked at the code for deleting a char on eqemu :

https://github.com/EQEmu/Server/blob...rld/client.cpp at 965 we have :

Code:
bool Client::HandleDeleteCharacterPacket(const EQApplicationPacket *app) {

	uint32 char_acct_id = database.GetAccountIDByChar((char*)app->pBuffer);
	if(char_acct_id == GetAccountID()) {
		LogInfo("Delete character: [{}]", app->pBuffer);
		database.DeleteCharacter((char *)app->pBuffer);
		SendCharInfo();
	}

	return true;
}
database.DeleteCharacter((char *)app->pBuffer); seems to be where the magic happens, which leads us to : https://github.com/EQEmu/Server/blob...n/database.cpp at 367

For soft deletes it runs this :

Code:
			SQL(
				UPDATE
				character_data
				SET
				name = SUBSTRING(CONCAT(name, '-deleted-', UNIX_TIMESTAMP()), 1, 64),
				deleted_at = NOW()
				WHERE
				id = '{}'
			),
Which my queries undo, for hard deletes it purges everything related to that character. If p1999 is running this, or similar code, then soft deletes should be easily recoverable. Hard deletes would require restoring from a backup which would be a pain to deal with and unlikely to ever happen.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:42 AM.


Everquest is a registered trademark of Daybreak Game Company LLC.
Project 1999 is not associated or affiliated in any way with Daybreak Game Company LLC.
Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.