Reworked EVENT_COMMAND handling and addressed script commands not present during help use

This commit is contained in:
Uleat
2020-01-06 15:41:05 -05:00
parent 4e8aec136e
commit 852d951b65
8 changed files with 54 additions and 10 deletions
+6
View File
@@ -783,6 +783,12 @@ void command_help(Client *c, const Seperator *sep)
commands_shown++;
c->Message(Chat::White, " %c%s %s", COMMAND_CHAR, cur->first.c_str(), cur->second->desc == nullptr?"":cur->second->desc);
}
if (parse->PlayerHasQuestSub(EVENT_COMMAND)) {
int i = parse->EventPlayer(EVENT_COMMAND, c, sep->msg, 0);
if (i >= 1) {
commands_shown += i;
}
}
c->Message(Chat::White, "%d command%s listed.", commands_shown, commands_shown!=1?"s":"");
}