mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
[Commands] Remove #zopp Command (#3831)
# Notes - This command seems to be unused.
This commit is contained in:
parent
99d2e3a8b1
commit
d2f5dc43a6
@ -239,7 +239,6 @@ int command_init(void)
|
||||
command_add("zonebootup", "[ZoneServerID] [shortname] - Make a zone server boot a specific zone", AccountStatus::GMLeadAdmin, command_zonebootup) ||
|
||||
command_add("zoneinstance", "[Instance ID] [X] [Y] [Z] - Teleport to specified Instance by ID (coordinates are optional)", AccountStatus::Guide, command_zone_instance) ||
|
||||
command_add("zoneshutdown", "[shortname] - Shut down a zone server", AccountStatus::GMLeadAdmin, command_zoneshutdown) ||
|
||||
command_add("zopp", "Troubleshooting command - Sends a fake item packet to you. No server reference is created.", AccountStatus::GMImpossible, command_zopp) ||
|
||||
command_add("zsave", " Saves zheader to the database", AccountStatus::QuestTroupe, command_zsave)
|
||||
) {
|
||||
command_deinit();
|
||||
@ -927,5 +926,4 @@ void command_bot(Client *c, const Seperator *sep)
|
||||
#include "gm_commands/zonebootup.cpp"
|
||||
#include "gm_commands/zoneshutdown.cpp"
|
||||
#include "gm_commands/zone_instance.cpp"
|
||||
#include "gm_commands/zopp.cpp"
|
||||
#include "gm_commands/zsave.cpp"
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user