[Commands] Remove #zopp Command (#3831)

# Notes
- This command seems to be unused.
This commit is contained in:
Alex King
2024-01-06 23:18:47 -05:00
committed by GitHub
parent 99d2e3a8b1
commit d2f5dc43a6
2 changed files with 0 additions and 66 deletions
-64
View File
@@ -1,64 +0,0 @@
#include "../client.h"
void command_zopp(Client *c, const Seperator *sep)
{ // - Owner only command..non-targetable to eliminate malicious or mischievious activities.
if (!c) {
return;
}
else if (sep->argnum < 3 || sep->argnum > 4) {
c->Message(Chat::White, "Usage: #zopp [trade/summon] [slot id] [item id] [*charges]");
}
else if (!strcasecmp(sep->arg[1], "trade") == 0 && !strcasecmp(sep->arg[1], "t") == 0 &&
!strcasecmp(sep->arg[1], "summon") == 0 && !strcasecmp(sep->arg[1], "s") == 0) {
c->Message(Chat::White, "Usage: #zopp [trade/summon] [slot id] [item id] [*charges]");
}
else if (!sep->IsNumber(2) || !sep->IsNumber(3) || (sep->argnum == 4 && !sep->IsNumber(4))) {
c->Message(Chat::White, "Usage: #zopp [trade/summon] [slot id] [item id] [*charges]");
}
else {
ItemPacketType packettype;
if (strcasecmp(sep->arg[1], "trade") == 0 || strcasecmp(sep->arg[1], "t") == 0) {
packettype = ItemPacketTrade;
}
else {
packettype = ItemPacketLimbo;
}
int16 slotid = Strings::ToInt(sep->arg[2]);
uint32 itemid = Strings::ToInt(sep->arg[3]);
int16 charges = sep->argnum == 4 ? Strings::ToInt(sep->arg[4]) : 1; // defaults to 1 charge if not specified
const EQ::ItemData *FakeItem = database.GetItem(itemid);
if (!FakeItem) {
c->Message(Chat::Red, "Error: Item [%u] is not a valid item id.", itemid);
return;
}
int16 item_status = 0;
const EQ::ItemData *item = database.GetItem(itemid);
if (item) {
item_status = static_cast<int16>(item->MinStatus);
}
if (item_status > c->Admin()) {
c->Message(Chat::Red, "Error: Insufficient status to use this command.");
return;
}
if (charges < 0 || charges > FakeItem->StackSize) {
c->Message(Chat::Red, "Warning: The specified charge count does not meet expected criteria!");
c->Message(Chat::White, "Processing request..results may cause unpredictable behavior.");
}
EQ::ItemInstance *FakeItemInst = database.CreateItem(FakeItem, charges);
c->SendItemPacket(slotid, FakeItemInst, packettype);
c->Message(
Chat::White, "Sending zephyr op packet to client - [%s] %s (%u) with %i %s to slot %i.",
packettype == ItemPacketTrade ? "Trade" : "Summon", FakeItem->Name, itemid, charges,
std::abs(charges == 1) ? "charge" : "charges", slotid
);
safe_delete(FakeItemInst);
}
}