mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-21 18:58:21 +00:00
[GM Commands] Split GM Commands Into Separate Files (#1766)
* Split GM commands into their own files * Code cleanup
This commit is contained in:
Executable
+40
@@ -0,0 +1,40 @@
|
||||
#include "../client.h"
|
||||
|
||||
void command_zonespawn(Client *c, const Seperator *sep)
|
||||
{
|
||||
c->Message(Chat::White, "This command is not yet implemented.");
|
||||
return;
|
||||
|
||||
/* this was kept from client.cpp verbatim (it was commented out) */
|
||||
// if (target && target->IsNPC()) {
|
||||
// Message(0, "Inside main if.");
|
||||
// if (strcasecmp(sep->arg[1], "add")==0) {
|
||||
// Message(0, "Inside add if.");
|
||||
// database.DBSpawn(1, StaticGetZoneName(this->GetPP().current_zone), target->CastToNPC());
|
||||
// }
|
||||
// else if (strcasecmp(sep->arg[1], "update")==0) {
|
||||
// database.DBSpawn(2, StaticGetZoneName(this->GetPP().current_zone), target->CastToNPC());
|
||||
// }
|
||||
// else if (strcasecmp(sep->arg[1], "remove")==0) {
|
||||
// if (strcasecmp(sep->arg[2], "all")==0) {
|
||||
// database.DBSpawn(4, StaticGetZoneName(this->GetPP().current_zone));
|
||||
// }
|
||||
// else {
|
||||
// if (database.DBSpawn(3, StaticGetZoneName(this->GetPP().current_zone), target->CastToNPC())) {
|
||||
// Message(0, "#zonespawn: %s removed successfully!", target->GetName());
|
||||
// target->CastToNPC()->Death(target, target->GetHP());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// Message(0, "Error: #dbspawn: Invalid command. (Note: EDIT and REMOVE are NOT in yet.)");
|
||||
// if (target->CastToNPC()->GetNPCTypeID() > 0) {
|
||||
// Message(0, "Spawn is type %i", target->CastToNPC()->GetNPCTypeID());
|
||||
// }
|
||||
// }
|
||||
// else if(!target || !target->IsNPC())
|
||||
// Message(0, "Error: #zonespawn: You must have a NPC targeted!");
|
||||
// else
|
||||
// Message(0, "Usage: #zonespawn [add|edit|remove|remove all]");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user