Add #dzkickplayers command for pre-RoF clients

Performs "/kickplayers exp" for older clients without the command
This commit is contained in:
hg 2020-05-22 21:33:04 -04:00
parent 528b74109e
commit c9504452e1
2 changed files with 14 additions and 0 deletions

View File

@ -200,6 +200,7 @@ int command_init(void)
command_add("distance", "- Reports the distance between you and your target.", 80, command_distance) ||
command_add("doanim", "[animnum] [type] - Send an EmoteAnim for you or your target", 50, command_doanim) ||
command_add("dz", "Manage expeditions and dynamic zone instances", 80, command_dz) ||
command_add("dzkickplayers", "Removes all players from current expedition. (/kickplayers alternative for pre-RoF clients)", 0, command_dzkickplayers) ||
command_add("editmassrespawn", "[name-search] [second-value] - Mass (Zone wide) NPC respawn timer editing command", 100, command_editmassrespawn) ||
command_add("emote", "['name'/'world'/'zone'] [type] [message] - Send an emote message", 80, command_emote) ||
command_add("emotesearch", "Searches NPC Emotes", 80, command_emotesearch) ||
@ -6944,6 +6945,18 @@ void command_dz(Client* c, const Seperator* sep)
}
}
void command_dzkickplayers(Client* c, const Seperator* sep)
{
if (c)
{
auto expedition = c->GetExpedition();
if (expedition)
{
expedition->DzKickPlayers(c);
}
}
}
void command_editmassrespawn(Client* c, const Seperator* sep)
{
if (strcasecmp(sep->arg[1], "usage") == 0) {

View File

@ -93,6 +93,7 @@ void command_disarmtrap(Client *c, const Seperator *sep);
void command_distance(Client *c, const Seperator *sep);
void command_doanim(Client *c, const Seperator *sep);
void command_dz(Client *c, const Seperator *sep);
void command_dzkickplayers(Client *c, const Seperator *sep);
void command_editmassrespawn(Client* c, const Seperator* sep);
void command_emote(Client *c, const Seperator *sep);
void command_emotesearch(Client* c, const Seperator *sep);