aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorBrian <runningnak3d@gmail.com>2010-07-21 12:13:23 -0600
committerBrian <runningnak3d@gmail.com>2010-07-21 12:13:23 -0600
commit4320b1090166f05ee888400a6975b7288a86cba8 (patch)
tree698bf6ebfbb905043e6f2d0c253d5899e28ee7ea /sql
parent5995a8ec1d356cba24a62661616c04a058c251a2 (diff)
* Implement the ability to delete characters without them being removed from
* the DB, so they can be unerased * Original patch by DasBlub * Ported to Trinty by Az@zel --HG-- branch : trunk
Diffstat (limited to 'sql')
-rw-r--r--sql/base/characters_database.sql3
-rw-r--r--sql/base/world_database.sql17
-rw-r--r--sql/updates/8971_characters_characters.sql5
-rw-r--r--sql/updates/8971_world_command.sql8
4 files changed, 32 insertions, 1 deletions
diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql
index 6ec8cd968e9..4dc67ef97a1 100644
--- a/sql/base/characters_database.sql
+++ b/sql/base/characters_database.sql
@@ -392,6 +392,9 @@ CREATE TABLE `characters` (
`ammoId` int(10) UNSIGNED NOT NULL default '0',
`knownTitles` longtext,
`actionBars` tinyint(3) UNSIGNED NOT NULL default '0',
+ `deleteInfos_Account` int(11) UNSIGNED default NULL,
+ `deleteInfos_Name` varchar(12) default NULL,
+ `deleteDate` bigint(20) default NULL,
PRIMARY KEY (`guid`),
KEY `idx_account` (`account`),
KEY `idx_online` (`online`),
diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql
index 33fe9611d87..0b870ec0b8b 100644
--- a/sql/base/world_database.sql
+++ b/sql/base/world_database.sql
@@ -350,7 +350,11 @@ INSERT INTO `command` VALUES
('cast self',3,'Syntax: .cast self #spellid [triggered]\r\nCast #spellid by target at target itself. If ''trigered'' or part provided then spell casted with triggered flag.'),
('cast target',3,'Syntax: .cast target #spellid [triggered]\r\n Selected target will cast #spellid to his victim. If ''trigered'' or part provided then spell casted with triggered flag.'),
('character customize',2,'Syntax: .character customize [$name]\r\n\r\nMark selected in game or by $name in command character for customize at next login.'),
-('character delete',4,'Syntax: .character delete $name\r\n\r\nDelete character $name.'),
+('character erase',4,'Syntax: .character erase $name\r\n\r\nDelete character $name. Character finally deleted in case any deleting options.'),
+('character deleted delete', 4, 'Syntax: .character deleted delete #guid|$name\r\n\r\nCompletely deletes the selected characters.\r\nIf $name is supplied, only characters with that string in their name will be deleted, if #guid is supplied, only the character with that GUID will be deleted.'),
+('character deleted list', 3, 'Syntax: .character deleted list [#guid|$name]\r\n\r\nShows a list with all deleted characters.\r\nIf $name is supplied, only characters with that string in their name will be selected, if #guid is supplied, only the character with that GUID will be selected.'),
+('character deleted old', 4, 'Syntax: .character deleted old [#keepDays]\r\n\r\nCompletely deletes all characters with deleted time longer #keepDays. If #keepDays not provided the used value from mangosd.conf option \'CharDelete.KeepDays\'. If referenced config option disabled (use 0 value) then command can\'t be used without #keepDays.'),
+('character deleted restore', 3, 'Syntax: .character deleted restore #guid|$name [$newname] [#new account]\r\n\r\nRestores deleted characters.\r\nIf $name is supplied, only characters with that string in their name will be restored, if $guid is supplied, only the character with that GUID will be restored.\r\nIf $newname is set, the character will be restored with that name instead of the original one. If #newaccount is set, the character will be restored to specific account character list. This works only with one character!');
('character level',3,'Syntax: .character level [$playername] [#level]\r\n\r\nSet the level of character with $playername (or the selected if not name provided) by #numberoflevels Or +1 if no #numberoflevels provided). If #numberoflevels is omitted, the level will be increase by 1. If #numberoflevels is 0, the same level will be restarted. If no character is selected and name not provided, increase your level. Command can be used for offline character. All stats and dependent values recalculated. At level decrease talents can be reset if need. Also at level decrease equipped items with greater level requirement can be lost.'),
('character rename',2,'Syntax: .character rename [$name]\r\n\r\nMark selected in game or by $name in command character for rename at next login.'),
('character reputation',2,'Syntax: .character reputation [$player_name]\r\n\r\nShow reputation information for selected player or player find by $player_name.'),
@@ -15252,6 +15256,17 @@ INSERT INTO `trinity_string` (`entry`,`content_default`,`content_loc1`,`content_
(1013, '-[%16s][%12s][%15s][%5d][%9d][%3d][%4d]', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(1014, 'No online players.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(1015, '============================== Characters Online =============================', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+(1016, '| GUID | Name | Account | Delete Date |', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+(1017, '| %10u | %20s | %15s (%10u) | %19s |', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+(1018, '==========================================================================================', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+(1019, 'No characters found.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+(1020, 'Restoring the following characters:', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+(1021, 'Deleting the following characters:', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+(1022, 'ERROR: You can only assign a new name if you have only selected a single character!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+(1023, 'Character \'%s\' (GUID: %u Account %u) can\'t be restored: account not exist!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+(1024, 'Character \'%s\' (GUID: %u Account %u) can\'t be restored: account character list full!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+(1025, 'Character \'%s\' (GUID: %u Account %u) can\'t be restored: new name already used!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+(1026, 'GUID: %u Name: %s Account: %s (%u) Date: %s', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
(1100, 'Account %s (Id: %u) have up to %u expansion allowed now.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(1101, 'Message of the day changed to:\r\n%s', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(1102, 'Message sent to %s: %s', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
diff --git a/sql/updates/8971_characters_characters.sql b/sql/updates/8971_characters_characters.sql
new file mode 100644
index 00000000000..c780250a1a4
--- /dev/null
+++ b/sql/updates/8971_characters_characters.sql
@@ -0,0 +1,5 @@
+ALTER TABLE `characters`
+ ADD COLUMN `deleteInfos_Account` int(11) UNSIGNED default NULL AFTER actionBars,
+ ADD COLUMN `deleteInfos_Name` varchar(12) default NULL AFTER deleteInfos_Account,
+ ADD COLUMN `deleteDate` bigint(20) default NULL AFTER deleteInfos_Name;
+
diff --git a/sql/updates/8971_world_command.sql b/sql/updates/8971_world_command.sql
new file mode 100644
index 00000000000..d7139386aa4
--- /dev/null
+++ b/sql/updates/8971_world_command.sql
@@ -0,0 +1,8 @@
+DELETE FROM command WHERE name IN ('character delete', 'character deleted list', 'character deleted restore', 'character deleted delete', 'character deleted old', 'character erase');
+INSERT INTO command (name, security, help) VALUES
+('character erase',4,'Syntax: .character erase $name\r\n\r\nDelete character $name. Character finally deleted in case any deleting options.'),
+('character deleted delete', 4, 'Syntax: .character deleted delete #guid|$name\r\n\r\nCompletely deletes the selected characters.\r\nIf $name is supplied, only characters with that string in their name will be deleted, if #guid is supplied, only the character with that GUID will be deleted.'),
+('character deleted list', 3, 'Syntax: .character deleted list [#guid|$name]\r\n\r\nShows a list with all deleted characters.\r\nIf $name is supplied, only characters with that string in their name will be selected, if #guid is supplied, only the character with that GUID will be selected.'),
+('character deleted old', 4, 'Syntax: .character deleted old [#keepDays]\r\n\r\nCompletely deletes all characters with deleted time longer #keepDays. If #keepDays not provided the used value from mangosd.conf option \'CharDelete.KeepDays\'. If referenced config option disabled (use 0 value) then command can\'t be used without #keepDays.'),
+('character deleted restore', 3, 'Syntax: .character deleted restore #guid|$name [$newname] [#new account]\r\n\r\nRestores deleted characters.\r\nIf $name is supplied, only characters with that string in their name will be restored, if $guid is supplied, only the character with that GUID will be restored.\r\nIf $newname is set, the character will be restored with that name instead of the original one. If #newaccount is set, the character will be restored to specific account character list. This works only with one character!');
+