mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 04:16:46 +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
+16
@@ -0,0 +1,16 @@
|
||||
#include "../client.h"
|
||||
|
||||
void command_nukeitem(Client *c, const Seperator *sep)
|
||||
{
|
||||
int numitems, itemid;
|
||||
|
||||
if (c->GetTarget() && c->GetTarget()->IsClient() && (sep->IsNumber(1) || sep->IsHexNumber(1))) {
|
||||
itemid = sep->IsNumber(1) ? atoi(sep->arg[1]) : hextoi(sep->arg[1]);
|
||||
numitems = c->GetTarget()->CastToClient()->NukeItem(itemid);
|
||||
c->Message(Chat::White, " %u items deleted", numitems);
|
||||
}
|
||||
else {
|
||||
c->Message(Chat::White, "Usage: (targted) #nukeitem itemnum - removes the item from the player's inventory");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user