aboutsummaryrefslogtreecommitdiff
path: root/doc/CharacterDBCleanup.txt
blob: 490243c70f7d68b346c090b35e37d9a6e353d150 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 The purpose of the CharacterDB cleanup routines is to remove old, non- 
existent and erranous/defunct skills, talents, spells, and achievements 
from characters in the database.

 To achieve this, add an entry (number) in the worldstate-table 
(id:20004), combining the following arguments (bitmasked):

    CLEANING_FLAG_ACHIEVEMENT_PROGRESS  = 0x1
    CLEANING_FLAG_SKILLS                = 0x2
    CLEANING_FLAG_SPELLS                = 0x4
    CLEANING_FLAG_TALENTS               = 0x8
    CLEANING_FLAG_QUESTSTATUS           = 0x10

Example:
 We want to clean up old talents, spells and skills, but leave 
achivements alone - ie. NOT touching those. We'd then need to combine 
the numbers from each of the above fields:

  CLEANING_FLAG_SKILLS + CLEANING_FLAG_SPELLS + CLEANING_FLAG_TALENTS

This comes out as 2+4+8 => 14, and we now put an entry in for this in 
the worldstate table (this is done on the CHARACTERS database) :

  UPDATE worldstates SET value=14 WHERE entry=20004;

This will then (when the core is restarting) clean up old and missing
skills, spells and talents.

Please note that we are not responsible for any issues that might come 
from this, and that you are (as the owner of the database), responsible 
for doing proper backups prior to doing the above in case of anything 
going wrong.

-- The TrinityCore developer team