[Commands] Remove unused #bestz and #pf Commands. (#2112)

- Remove unused commands.
This commit is contained in:
Kinglykrab 2022-05-06 21:13:26 -04:00 committed by GitHub
parent e62a283a79
commit 4eaf44fc33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 0 additions and 120 deletions

View File

@ -1244,10 +1244,6 @@ int bot_command_count; // how many bot commands we have
// init has been performed to point at the real function
int (*bot_command_dispatch)(Client *,char const *) = bot_command_not_avail;
// TODO: Find out what these are for...
void bot_command_bestz(Client *c, const Seperator *message);
void bot_command_pf(Client *c, const Seperator *message);
std::map<std::string, BotCommandRecord *> bot_command_list;
std::map<std::string, std::string> bot_command_aliases;

View File

@ -125,7 +125,6 @@ int command_init(void)
command_add("attack", "[Entity Name] - Make your NPC target attack an entity by name", AccountStatus::GMLeadAdmin, command_attack) ||
command_add("augmentitem", "Force augments an item. Must have the augment item window open.", AccountStatus::GMImpossible, command_augmentitem) ||
command_add("ban", "[name] [reason]- Ban by character name", AccountStatus::GMLeadAdmin, command_ban) ||
command_add("bestz", "- Ask map for a good Z coord for your x,y coords.", AccountStatus::Player, command_bestz) ||
command_add("bind", "- Sets your targets bind spot to their current location", AccountStatus::GMMgmt, command_bind) ||
#ifdef BOTS
@ -275,7 +274,6 @@ int command_init(void)
command_add("permarace", "[Race ID] - Change your or your player target's race", AccountStatus::QuestTroupe, command_permarace) ||
command_add("petitems", "- View your pet's items if you have one", AccountStatus::ApprenticeGuide, command_petitems) ||
command_add("petitioninfo", "[petition number] - Get info about a petition", AccountStatus::ApprenticeGuide, command_petitioninfo) ||
command_add("pf", "- Display additional mob coordinate and wandering data", AccountStatus::Player, command_pf) ||
command_add("picklock", "Analog for ldon pick lock for the newer clients since we still don't have it working.", AccountStatus::Player, command_picklock) ||
command_add("profanity", "Manage censored language.", AccountStatus::GMLeadAdmin, command_profanity) ||
command_add("push", "[Back Push] [Up Push] - Lets you do spell push on an NPC", AccountStatus::GMLeadAdmin, command_push) ||
@ -1180,7 +1178,6 @@ void command_bot(Client *c, const Seperator *sep)
#include "gm_commands/attack.cpp"
#include "gm_commands/augmentitem.cpp"
#include "gm_commands/ban.cpp"
#include "gm_commands/bestz.cpp"
#include "gm_commands/bind.cpp"
#include "gm_commands/camerashake.cpp"
#include "gm_commands/castspell.cpp"
@ -1323,7 +1320,6 @@ void command_bot(Client *c, const Seperator *sep)
#include "gm_commands/petitems.cpp"
#include "gm_commands/petitioninfo.cpp"
#include "gm_commands/petname.cpp"
#include "gm_commands/pf.cpp"
#include "gm_commands/picklock.cpp"
#include "gm_commands/profanity.cpp"
#include "gm_commands/proximity.cpp"

View File

@ -175,8 +175,6 @@ void command_nukeitem(Client *c, const Seperator *sep);
void command_object(Client *c, const Seperator *sep);
void command_oocmute(Client *c, const Seperator *sep);
void command_opcode(Client *c, const Seperator *sep);
void command_bestz(Client *c, const Seperator *message);
void command_pf(Client *c, const Seperator *message);
#ifdef PACKET_PROFILER
void command_packetprofile(Client *c, const Seperator *sep);

View File

@ -1,89 +0,0 @@
#include "../client.h"
#include "../water_map.h"
void command_bestz(Client *c, const Seperator *sep)
{
if (zone->zonemap == nullptr) {
c->Message(Chat::White, "Map not loaded for this zone");
}
else {
glm::vec3 me;
me.x = c->GetX();
me.y = c->GetY();
me.z = c->GetZ() + (c->GetSize() == 0.0 ? 6 : c->GetSize()) * HEAD_POSITION;
glm::vec3 hit;
glm::vec3 bme(me);
bme.z -= 500;
float best_z = zone->zonemap->FindBestZ(me, &hit);
if (best_z != BEST_Z_INVALID) {
c->Message(Chat::White, "Z is %.3f at (%.3f, %.3f).", best_z, me.x, me.y);
}
else {
c->Message(Chat::White, "Found no Z.");
}
}
if (zone->watermap == nullptr) {
c->Message(Chat::White, "Water Region Map not loaded for this zone");
}
else {
WaterRegionType RegionType;
float z;
if (c->GetTarget()) {
z = c->GetTarget()->GetZ();
auto position = glm::vec3(c->GetTarget()->GetX(), c->GetTarget()->GetY(), z);
RegionType = zone->watermap->ReturnRegionType(position);
c->Message(Chat::White, "InWater returns %d", zone->watermap->InWater(position));
c->Message(Chat::White, "InLava returns %d", zone->watermap->InLava(position));
}
else {
z = c->GetZ();
auto position = glm::vec3(c->GetX(), c->GetY(), z);
RegionType = zone->watermap->ReturnRegionType(position);
c->Message(Chat::White, "InWater returns %d", zone->watermap->InWater(position));
c->Message(Chat::White, "InLava returns %d", zone->watermap->InLava(position));
}
switch (RegionType) {
case RegionTypeNormal: {
c->Message(Chat::White, "There is nothing special about the region you are in!");
break;
}
case RegionTypeWater: {
c->Message(Chat::White, "You/your target are in Water.");
break;
}
case RegionTypeLava: {
c->Message(Chat::White, "You/your target are in Lava.");
break;
}
case RegionTypeVWater: {
c->Message(Chat::White, "You/your target are in VWater (Icy Water?).");
break;
}
case RegionTypePVP: {
c->Message(Chat::White, "You/your target are in a pvp enabled area.");
break;
}
case RegionTypeSlime: {
c->Message(Chat::White, "You/your target are in slime.");
break;
}
case RegionTypeIce: {
c->Message(Chat::White, "You/your target are in ice.");
break;
}
default:
c->Message(Chat::White, "You/your target are in an unknown region type.");
}
}
}

View File

@ -1,21 +0,0 @@
#include "../client.h"
void command_pf(Client *c, const Seperator *sep)
{
if (c->GetTarget()) {
Mob *who = c->GetTarget();
c->Message(Chat::White, "POS: (%.2f, %.2f, %.2f)", who->GetX(), who->GetY(), who->GetZ());
c->Message(
Chat::White,
"WP: %s (%d/%d)",
to_string(who->GetCurrentWayPoint()).c_str(),
who->IsNPC() ? who->CastToNPC()->GetMaxWp() : -1
);
c->Message(Chat::White, "pause=%d RAspeed=%d", who->GetCWPP(), who->GetRunAnimSpeed());
//who->DumpMovement(c);
}
else {
c->Message(Chat::White, "ERROR: target required");
}
}