[10323] Implement achivement view commands.

This is fist part for achievement related command set.
Edition commands will added in some later commits when ready.

Two command added:

* .lookup achievment $partname - show fit achievements
  (id, shiftlink, complete date for selected player).
  shiftlink included similar data as generated by client for achievement shift-link
  (complete state, complete date, marked completed criteria).

* .character achievements [$playername] - show completed achievements for selected player
This commit is contained in:
VladimirMangos 2010-08-06 02:09:04 +04:00
parent 0cc1fbe697
commit 373f607a44
14 changed files with 174 additions and 11 deletions

View file

@ -24,7 +24,7 @@ CREATE TABLE `db_version` (
`version` varchar(120) default NULL,
`creature_ai_version` varchar(120) default NULL,
`cache_id` int(10) default '0',
`required_10314_02_mangos_command` bit(1) default NULL
`required_10323_02_mangos_command` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
--
@ -520,6 +520,7 @@ INSERT INTO `command` VALUES
('cast dist',3,'Syntax: .cast dist #spellid [#dist [triggered]]\r\n You will cast spell to pint at distance #dist. If \'trigered\' or part provided then spell casted with triggered flag. Not all spells can be casted as area spells.'),
('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 achievements',2,'Syntax: .character achievements [$player_name]\r\n\r\nShow completed achievments for selected player or player find by $player_name.'),
('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 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.'),
@ -620,6 +621,7 @@ INSERT INTO `command` VALUES
('lookup account email',2,'Syntax: .lookup account email $emailpart [#limit] \r\n\r\n Searchs accounts, which email including $emailpart with optional parametr #limit of results. If #limit not provided expected 100.'),
('lookup account ip',2,'Syntax: lookup account ip $ippart [#limit] \r\n\r\n Searchs accounts, which last used ip inluding $ippart (textual) with optional parametr #$limit of results. If #limit not provided expected 100.'),
('lookup account name',2,'Syntax: .lookup account name $accountpart [#limit] \r\n\r\n Searchs accounts, which username including $accountpart with optional parametr #limit of results. If #limit not provided expected 100.'),
('lookup achievement',2,'Syntax: .lookup $name\r\nLooks up a achievement by $namepart, and returns all matches with their quest ID\'s. Achievement shift-links generated with information about achievment state for selected player. Also for completed achievments in list show complete date.'),
('lookup area',1,'Syntax: .lookup area $namepart\r\n\r\nLooks up an area by $namepart, and returns all matches with their area ID\'s.'),
('lookup creature',3,'Syntax: .lookup creature $namepart\r\n\r\nLooks up a creature by $namepart, and returns all matches with their creature ID\'s.'),
('lookup event',2,'Syntax: .lookup event $name\r\nAttempts to find the ID of the event with the provided $name.'),
@ -3288,6 +3290,7 @@ INSERT INTO `mangos_string` VALUES
(369,'Required quest (normal difficulty):',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(370,'Required heroic keys:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(371,'Required quest (heroic difficulty):',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(372,'No achievement!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(400,'|cffff0000[System Message]:|rScripts reloaded',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(401,'You change security level of account %s to %i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(402,'%s changed your security level to %i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),

View file

@ -0,0 +1,6 @@
ALTER TABLE db_version CHANGE COLUMN required_10314_02_mangos_command required_10323_01_mangos_mangos_string bit;
DELETE FROM mangos_string WHERE entry IN (372);
INSERT INTO mangos_string VALUES
(372,'No achievement!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);

View file

@ -0,0 +1,6 @@
ALTER TABLE db_version CHANGE COLUMN required_10323_01_mangos_mangos_string required_10323_02_mangos_command bit;
DELETE FROM command WHERE name IN ('lookup achievement','character achievements');
INSERT INTO command (name, security, help) VALUES
('character achievements',2,'Syntax: .character achievements [$player_name]\r\n\r\nShow completed achievments for selected player or player find by $player_name.'),
('lookup achievement',2,'Syntax: .lookup $name\r\nLooks up a achievement by $namepart, and returns all matches with their quest ID\'s. Achievement shift-links generated with information about achievment state for selected player. Also for completed achievments in list show complete date.');

View file

@ -68,6 +68,8 @@ pkgdata_DATA = \
10312_02_characters_pet_aura.sql \
10314_01_mangos_mangos_string.sql \
10314_02_mangos_command.sql \
10323_01_mangos_mangos_string.sql \
10323_02_mangos_command.sql \
README
## Additional files to include when running 'make dist'
@ -116,4 +118,6 @@ EXTRA_DIST = \
10312_02_characters_pet_aura.sql \
10314_01_mangos_mangos_string.sql \
10314_02_mangos_command.sql \
10323_01_mangos_mangos_string.sql \
10323_02_mangos_command.sql \
README