Core/Commands: .npc set faction fix and improvement (#1001)

Fix error message in console, and add help text for new 'npc set faction' command
This commit is contained in:
Barbz
2018-08-13 15:46:42 +02:00
committed by GitHub
2 changed files with 15 additions and 3 deletions

View File

@@ -0,0 +1,12 @@
INSERT INTO version_db_world (`sql_rev`) VALUES ('1534115647861309430');
DELETE FROM `command` WHERE `name` IN
('npc set factionid',
'npc set faction temp',
'npc set faction original',
'npc set faction permanent');
INSERT INTO `command` (`name`, `security`, `help`) VALUES
('npc set faction temp', 3, 'Syntax: .npc set faction temp #factionid\r\n\r\nTemporarily set the faction of the selected creature to #factionid.'),
('npc set faction original', 3, 'Syntax: .npc set faction original\r\n\r\nRevert the temporal faction of the selected creature.'),
('npc set faction permanent', 3, 'Syntax: .npc set faction permanent #factionid\r\n\r\nPermanently set the faction of the selected creature to #factionid.');

View File

@@ -133,9 +133,9 @@ public:
static std::vector<ChatCommand> npcFactionCommandTable =
{
{ "Permanent", SEC_ADMINISTRATOR, false, &HandleNpcSetFactionIdCommand, "" },
{ "Temp", SEC_ADMINISTRATOR, false, &HandleNpcSetFactionTempIdCommand, "" },
{ "Original", SEC_ADMINISTRATOR, false, &HandleNpcSetOriginalFaction, "" }
{ "permanent", SEC_ADMINISTRATOR, false, &HandleNpcSetFactionIdCommand, "" },
{ "temp", SEC_ADMINISTRATOR, false, &HandleNpcSetFactionTempIdCommand, "" },
{ "original", SEC_ADMINISTRATOR, false, &HandleNpcSetOriginalFaction, "" }
};
static std::vector<ChatCommand> npcSetCommandTable =