mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 16:41:29 +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:
parent
02828a73b8
commit
e26eba8e03
@ -256,7 +256,6 @@ int command_init(void)
|
|||||||
command_add("npcshout", "[Message] - Make your NPC target shout a message.", AccountStatus::GMLeadAdmin, command_npcshout) ||
|
command_add("npcshout", "[Message] - Make your NPC target shout a message.", AccountStatus::GMLeadAdmin, command_npcshout) ||
|
||||||
command_add("npcspawn", "[create/add/update/remove/delete] - Manipulate spawn DB", AccountStatus::GMAreas, command_npcspawn) ||
|
command_add("npcspawn", "[create/add/update/remove/delete] - Manipulate spawn DB", AccountStatus::GMAreas, command_npcspawn) ||
|
||||||
command_add("npcstats", "- Show stats about target NPC", AccountStatus::QuestTroupe, command_npcstats) ||
|
command_add("npcstats", "- Show stats about target NPC", AccountStatus::QuestTroupe, command_npcstats) ||
|
||||||
command_add("npctype_cache", "[id] or all - Clears the npc type cache for either the id or all npcs.", AccountStatus::GMImpossible, command_npctype_cache) ||
|
|
||||||
command_add("npctypespawn", "[NPC ID] [Faction ID] - Spawn an NPC by ID from the database with an option of setting its Faction ID", AccountStatus::Steward, command_npctypespawn) ||
|
command_add("npctypespawn", "[NPC ID] [Faction ID] - Spawn an NPC by ID from the database with an option of setting its Faction ID", AccountStatus::Steward, command_npctypespawn) ||
|
||||||
command_add("nudge", "- Nudge your target's current position by specific values", AccountStatus::QuestTroupe, command_nudge) ||
|
command_add("nudge", "- Nudge your target's current position by specific values", AccountStatus::QuestTroupe, command_nudge) ||
|
||||||
command_add("nukebuffs", "[Beneficial|Detrimental|Help] - Strip all buffs by type on you or your target (no argument to remove all buffs)", AccountStatus::Guide, command_nukebuffs) ||
|
command_add("nukebuffs", "[Beneficial|Detrimental|Help] - Strip all buffs by type on you or your target (no argument to remove all buffs)", AccountStatus::Guide, command_nukebuffs) ||
|
||||||
@ -1299,7 +1298,6 @@ void command_bot(Client *c, const Seperator *sep)
|
|||||||
#include "gm_commands/npcshout.cpp"
|
#include "gm_commands/npcshout.cpp"
|
||||||
#include "gm_commands/npcspawn.cpp"
|
#include "gm_commands/npcspawn.cpp"
|
||||||
#include "gm_commands/npcstats.cpp"
|
#include "gm_commands/npcstats.cpp"
|
||||||
#include "gm_commands/npctype_cache.cpp"
|
|
||||||
#include "gm_commands/npctypespawn.cpp"
|
#include "gm_commands/npctypespawn.cpp"
|
||||||
#include "gm_commands/nudge.cpp"
|
#include "gm_commands/nudge.cpp"
|
||||||
#include "gm_commands/nukebuffs.cpp"
|
#include "gm_commands/nukebuffs.cpp"
|
||||||
|
|||||||
@ -166,7 +166,6 @@ void command_npcsay(Client *c, const Seperator *sep);
|
|||||||
void command_npcshout(Client *c, const Seperator *sep);
|
void command_npcshout(Client *c, const Seperator *sep);
|
||||||
void command_npcspawn(Client *c, const Seperator *sep);
|
void command_npcspawn(Client *c, const Seperator *sep);
|
||||||
void command_npcstats(Client *c, const Seperator *sep);
|
void command_npcstats(Client *c, const Seperator *sep);
|
||||||
void command_npctype_cache(Client *c, const Seperator *sep);
|
|
||||||
void command_npctypespawn(Client *c, const Seperator *sep);
|
void command_npctypespawn(Client *c, const Seperator *sep);
|
||||||
void command_nudge(Client *c, const Seperator *sep);
|
void command_nudge(Client *c, const Seperator *sep);
|
||||||
void command_nukebuffs(Client *c, const Seperator *sep);
|
void command_nukebuffs(Client *c, const Seperator *sep);
|
||||||
|
|||||||
@ -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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user