mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 04:56:20 +00:00
[Commands] Remove unused/broken #deletegraveyard and #setgraveyard Commands. (#2198)
- These commands don't function in their current state, and they probably haven't ever. - Removing the commands and putting this in an editor makes more sense, as #setgraveyard uses the current zone XYZ coordinates of a target to set a graveyard for another zone. and they also only allow version 0 graveyards. - Not sure of a better idea than just deleting, as setting data based on another zone using your current zone's data seems beyond the scope of a command.
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
#include "../client.h"
|
||||
|
||||
void command_deletegraveyard(Client *c, const Seperator *sep)
|
||||
{
|
||||
uint32 zoneid = 0;
|
||||
uint32 graveyard_id = 0;
|
||||
|
||||
if (!sep->arg[1][0]) {
|
||||
c->Message(Chat::White, "Usage: #deletegraveyard [zonename]");
|
||||
return;
|
||||
}
|
||||
|
||||
zoneid = ZoneID(sep->arg[1]);
|
||||
graveyard_id = content_db.GetZoneGraveyardID(zoneid, 0);
|
||||
|
||||
if (zoneid > 0 && graveyard_id > 0) {
|
||||
if (content_db.DeleteGraveyard(zoneid, graveyard_id)) {
|
||||
c->Message(Chat::White, "Successfuly deleted graveyard %u for zone %s.", graveyard_id, sep->arg[1]);
|
||||
}
|
||||
else {
|
||||
c->Message(Chat::White, "Unable to delete graveyard %u for zone %s.", graveyard_id, sep->arg[1]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (zoneid <= 0) {
|
||||
c->Message(Chat::White, "Unable to retrieve a ZoneID for the zone: %s", sep->arg[1]);
|
||||
}
|
||||
else if (graveyard_id <= 0) {
|
||||
c->Message(Chat::White, "Unable to retrieve a valid GraveyardID for the zone: %s", sep->arg[1]);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
#include "../client.h"
|
||||
|
||||
void command_setgraveyard(Client *c, const Seperator *sep)
|
||||
{
|
||||
uint32 zoneid = 0;
|
||||
uint32 graveyard_id = 0;
|
||||
Client *t = c;
|
||||
|
||||
if (c->GetTarget() && c->GetTarget()->IsClient() && c->GetGM()) {
|
||||
t = c->GetTarget()->CastToClient();
|
||||
}
|
||||
|
||||
if (!sep->arg[1][0]) {
|
||||
c->Message(Chat::White, "Usage: #setgraveyard [zonename]");
|
||||
return;
|
||||
}
|
||||
|
||||
zoneid = ZoneID(sep->arg[1]);
|
||||
|
||||
if (zoneid > 0) {
|
||||
graveyard_id = content_db.CreateGraveyardRecord(zoneid, t->GetPosition());
|
||||
|
||||
if (graveyard_id > 0) {
|
||||
c->Message(Chat::White, "Successfuly added a new record for this graveyard!");
|
||||
if (content_db.AddGraveyardIDToZone(zoneid, graveyard_id) > 0) {
|
||||
c->Message(Chat::White, "Successfuly added this new graveyard for the zone %s.", sep->arg[1]);
|
||||
// TODO: Set graveyard data to the running zone process.
|
||||
c->Message(Chat::White, "Done!");
|
||||
}
|
||||
else {
|
||||
c->Message(Chat::White, "Unable to add this new graveyard to the zone %s.", sep->arg[1]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
c->Message(Chat::White, "Unable to create a new graveyard record in the database.");
|
||||
}
|
||||
}
|
||||
else {
|
||||
c->Message(Chat::White, "Unable to retrieve a ZoneID for the zone: %s", sep->arg[1]);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user