Jump to content

[9767][patch]Don't delete chars finally


Recommended Posts

Posted

I have the patch up an running and can only say:

It saves A LOT of time!

There even occured the joke:

"If you want your character to be save... delete it!!"

Items can be farmed in less time again. Complete characters a lot more time expensive.

And to build them up from scratch in case a DB structure change has taken place since the deletion... well, I did it a few times... and changing the dump manually was anything else than funny.

This patch is optional. If someone doesn't like it, it can be turned of by config.

And if it is like jdguzman said... it's very well a step forward to support official support behavior.

  • Replies 90
  • Created
  • Last Reply

Top Posters In This Topic

Posted

i can assure you that the comments i made are true i played official for two years and stopped a few months ago due to lack of time (hopefully that changes). I can assure you that in the two years that i played i had several occasion where i had to get items restored and one occasion where i accidently deleted a character and had it restored.

in the case of items i know that there was one occasion where it wasn't restored because i submitted the ticket 24 hours after i destroyed the item. the gm went on to tell me that in order to have items restored i have to submit a ticket within 24 hours of having destroyed the item. obviously this is hints at the fact that items remain in the database for atleast that amount of time after they are destroyed.

on the character front i am less sure. when i did delete the character accidently i submitted the ticket immediately after having done it. what i can tell you is that about an hour later my character was back up and working. with the amount of traffic that these servers get, and i'm sure there is many character deletions on a daily basis, i would only have to surmise that they have something along the lines of this patch implemented on official servers.

at any rate i'm rambling.

  • 2 weeks later...
Posted

here are 2 usefull sql-statements for the daily work with this patch:

restore a character:

UPDATE characters
SET    name                = deleteInfos_Name
     ,account             = deleteInfos_Account
     ,deleteInfos_Name    = NULL
     ,deleteInfos_Account = NULL
     ,deleteDate          = NULL
WHERE  deleteInfos_Name    IS NOT NULL
 AND  deleteInfos_Account IS NOT NULL
 AND  guid = -1;

(for a formated code see here: http://paste2.org/p/118125 )

to restore a char with this statement you have to replace the -1 in the last line with the GUID from the char. you can also remove the last line to restore ALL characters.

INFO: if you restore a character by hand (without the above sql statement), be sure that you set the deleteDate to NULL, else the char get's deleted anyway...

statistik:

SELECT COUNT(*) count

,YEAR(deleteDate) year

,MONTH(deleteDate) month

FROM characters

WHERE deleteDate IS NOT NULL

GROUP BY year,month;

(for a formated code see here: http://paste2.org/p/118121 )

can any dev give a statement if this will go into the master branch? this patch is now since some weeks in the 'under review' section and i haven't heard any statement until now...

Posted

is any dev looking at this :confused:

just updated to newest mangos-0.12 revision.

while pulling & pushing from/to github i just got the following errors, but i think ,this doesn't matter:

remote: error: object directory /data/git/repositories/4/45/12/8d/waza123/mangos

.git/objects does not exist; check .git/objects/info/alternates.←[K

remote: error: object directory /data/git/repositories/4/45/12/8d/waza123/mangos

.git/objects does not exist; check .git/objects/info/alternates.←[K

error: object directory /data/git/repositories/4/45/12/8d/waza123/mangos.git/obj

ects does not exist; check .git/objects/info/alternates.

error: object directory /data/git/repositories/4/45/12/8d/waza123/mangos.git/obj

ects does not exist; check .git/objects/info/alternates.

Posted

this version IS 2.4.3 compatible (it's mangos branch mangos-0.12) ;)

i'm currently not updating any of my branches to a 3.0.x version until there are less bugs there (when i'm watching the bug section i see that i have to wait ;))

  • 2 weeks later...
  • 2 weeks later...
  • 2 weeks later...
Posted
Can you create a patch of the current branch? It would be nice to see the changes.

( I don't see any difference @ HandleCharDeleteOpcode )

i'll do it tonight (in 12hours or so...) i just renamed my repo from 'mangos' to 'mangos_old' because i'm going to set it up new and then create the no_char_delete branch with a single commit (which you can use then as a diff file). i'll do both, a no_char_delete branch for master and one for mangos-0.12 ;)

Posted

This patch can be good if added like a config option, some testers send money to other chars and then delete chars to ask "can you please restore from backup" and have the same money they sent...

But I don't know if is useful for all so, better as a config option disabled by default.

  • 2 weeks later...
  • 3 weeks later...
  • 2 weeks later...
Posted

I think this patch is really useful NOW, reason: even if we make a characters backup without BULK INSERT statements it will be hard and long to insert the backup in db (without bulk statements it takes many hours, with bulk statements it takes more than 5GB ram and stucks, because of achievement_progress table)

With this change we keep the chars and only the account field in characters change. Someone can say it will take more space in db not deleting chars when prompted... NO, because you can always make a monthly cleanup with queries :)

Please consider this patch, personally saves much of my time.

Posted
NO, because you can always make a monthly cleanup with queries :)

there is even a config option with which you can easialy set the keep period ;)

# CharDeletion.KeepDays

# Define the amount of days for which the chars rest in the db bevore

# they get removed

# Default: 30

# 0 - Don't delete any chars, the rest in the db forever.

  • 1 month later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use