mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 13:16:39 +00:00
[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:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user