aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Commands
diff options
context:
space:
mode:
authortreeston <treeston.mmoc@gmail.com>2017-06-10 15:08:35 +0200
committerCarbenium <carbenium@outlook.com>2020-07-16 22:00:28 +0200
commit5392212799b669d91c80cf0e9539a3aaa2abbe79 (patch)
tree40db1efd019087e801f165ab4ad5f1640237b5f5 /src/server/scripts/Commands
parent2e8ce5a70f90392e00bd3e7a76a678423b5432e8 (diff)
So, I came in trying to fix gameobject LoS. So I restructured some stuff.
Then it turned out that gameobject LoS is already fixed. So all this does, really, is restructure some stuff. And remove the hack from Sapphiron because I could. (cherry picked from commit d57307f63d8deb51003d61163adccce4e2c1bd47)
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r--src/server/scripts/Commands/cs_debug.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp
index ae5a2a6bc84..794a02ee820 100644
--- a/src/server/scripts/Commands/cs_debug.cpp
+++ b/src/server/scripts/Commands/cs_debug.cpp
@@ -1055,8 +1055,15 @@ public:
static bool HandleDebugLoSCommand(ChatHandler* handler, char const* /*args*/)
{
if (Unit* unit = handler->getSelectedUnit())
- handler->PSendSysMessage("Unit %s (%s) is %sin LoS", unit->GetName().c_str(), unit->GetGUID().ToString().c_str(), handler->GetSession()->GetPlayer()->IsWithinLOSInMap(unit) ? "" : "not ");
- return true;
+ {
+ Player* player = handler->GetSession()->GetPlayer();
+ handler->PSendSysMessage("Checking LoS %s -> %s:", player->GetName().c_str(), unit->GetName().c_str());
+ handler->PSendSysMessage(" VMAP LoS: %s", player->IsWithinLOSInMap(unit, LINEOFSIGHT_CHECK_VMAP) ? "clear" : "obstructed");
+ handler->PSendSysMessage(" GObj LoS: %s", player->IsWithinLOSInMap(unit, LINEOFSIGHT_CHECK_GOBJECT) ? "clear" : "obstructed");
+ handler->PSendSysMessage("%s is %sin line of sight of %s.", unit->GetName().c_str(), (player->IsWithinLOSInMap(unit) ? "" : "not "), player->GetName().c_str());
+ return true;
+ }
+ return false;
}
static bool HandleDebugSetAuraStateCommand(ChatHandler* handler, char const* args)