[Commands] Cleanup #npctype_cache Command. (#2109)

* [Commands] Cleanup #npctype_cache Command.
- Cleanup messages and logic.
- Loop was returning as soon as it found first ID, so you couldn't use the spaced ID list functionality at all.

* Remove command.
This commit is contained in:
Kinglykrab
2022-05-06 22:13:16 -04:00
committed by GitHub
parent 02828a73b8
commit e26eba8e03
3 changed files with 0 additions and 30 deletions
-27
View File
@@ -1,27 +0,0 @@
#include "../client.h"
void command_npctype_cache(Client *c, const Seperator *sep)
{
if (sep->argnum > 0) {
for (int i = 0; i < sep->argnum; ++i) {
if (strcasecmp(sep->arg[i + 1], "all") == 0) {
c->Message(Chat::White, "Clearing all npc types from the cache.");
zone->ClearNPCTypeCache(-1);
}
else {
int id = atoi(sep->arg[i + 1]);
if (id > 0) {
c->Message(Chat::White, "Clearing npc type %d from the cache.", id);
zone->ClearNPCTypeCache(id);
return;
}
}
}
}
else {
c->Message(Chat::White, "Usage:");
c->Message(Chat::White, "#npctype_cache [npctype_id] ...");
c->Message(Chat::White, "#npctype_cache all");
}
}