Core/Commands: Added .modify power command allowing to change any power as long as player class can use it

* Power names are taken from PowerType.db2 (lowercase, using _ is optional)

Closes #20833
This commit is contained in:
Shauren
2017-11-11 22:41:05 +01:00
parent d947ba4292
commit bf0ae32d18
8 changed files with 119 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
--
DELETE FROM `rbac_permissions` WHERE `id`=867;
INSERT INTO `rbac_permissions` (`id`, `name`) VALUES
(867, 'Command: modify power');
DELETE FROM `rbac_linked_permissions` WHERE `id`=198 AND `linkedId`=867;
INSERT INTO `rbac_linked_permissions` (`id`, `linkedId`) VALUES (198, 867);

View File

@@ -0,0 +1,9 @@
DELETE FROM `trinity_string` WHERE `entry` IN (11019,11020,11021);
INSERT INTO `trinity_string` (`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`) VALUES
(11019, 'You changed %s of %s to %d/%d.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(11020, '%s changed your %s to %d/%d.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(11021, 'Invalid power name.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
DELETE FROM `command` WHERE `name`='modify power' and `permission`= 867;
INSERT INTO `command` (`name`, `permission`, `help`) VALUES
('modify power', 867, 'Syntax: .modify power #powerType #amount \r\n\r\nModify the power of the selected player. If no player is selected, modify your power.');