From 4eaf44fc33d18e5abf82004f88c602af8f6f020e Mon Sep 17 00:00:00 2001 From: Kinglykrab <89047260+Kinglykrab@users.noreply.github.com> Date: Fri, 6 May 2022 21:13:26 -0400 Subject: [PATCH] [Commands] Remove unused #bestz and #pf Commands. (#2112) - Remove unused commands. --- zone/bot_command.cpp | 4 -- zone/command.cpp | 4 -- zone/command.h | 2 - zone/gm_commands/bestz.cpp | 89 -------------------------------------- zone/gm_commands/pf.cpp | 21 --------- 5 files changed, 120 deletions(-) delete mode 100755 zone/gm_commands/bestz.cpp delete mode 100755 zone/gm_commands/pf.cpp diff --git a/zone/bot_command.cpp b/zone/bot_command.cpp index f45a733a7..5f174320c 100644 --- a/zone/bot_command.cpp +++ b/zone/bot_command.cpp @@ -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 bot_command_list; std::map bot_command_aliases; diff --git a/zone/command.cpp b/zone/command.cpp index ece883243..fcd4902b9 100755 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -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" diff --git a/zone/command.h b/zone/command.h index 0768b4bdf..7fd107a39 100644 --- a/zone/command.h +++ b/zone/command.h @@ -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); diff --git a/zone/gm_commands/bestz.cpp b/zone/gm_commands/bestz.cpp deleted file mode 100755 index 809e63ec1..000000000 --- a/zone/gm_commands/bestz.cpp +++ /dev/null @@ -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."); - } - } - - -} - - diff --git a/zone/gm_commands/pf.cpp b/zone/gm_commands/pf.cpp deleted file mode 100755 index 5867e346b..000000000 --- a/zone/gm_commands/pf.cpp +++ /dev/null @@ -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"); - } -} -