diff options
| author | Subv2112 <s.v.h21@hotmail.com> | 2012-02-03 16:03:52 -0500 |
|---|---|---|
| committer | Subv <s.v.h21@hotmail.com> | 2012-02-09 13:58:22 -0500 |
| commit | 93d199f04382fe3c7f6f08f59fd2ad058568679a (patch) | |
| tree | b698029a6cf0649bed6689cd0aa4414d8ad1aa42 /src/server/scripts/Commands | |
| parent | 229d4119e887fa6079a6e0b093860e11b5facb63 (diff) | |
Core/Collision: Ported dynamic line of sight patch by Silverice from MaNGOS and
added lots of improvements
Please re-extract vmaps
Diffstat (limited to 'src/server/scripts/Commands')
| -rw-r--r-- | src/server/scripts/Commands/cs_debug.cpp | 8 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_gps.cpp | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index 311c6586a0f..73e6b0ac8a5 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -88,6 +88,7 @@ public: { "update", SEC_ADMINISTRATOR, false, &HandleDebugUpdateCommand, "", NULL }, { "itemexpire", SEC_ADMINISTRATOR, false, &HandleDebugItemExpireCommand, "", NULL }, { "areatriggers", SEC_ADMINISTRATOR, false, &HandleDebugAreaTriggersCommand, "", NULL }, + { "los", SEC_MODERATOR, false, &HandleDebugLoSCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } }; static ChatCommand commandTable[] = @@ -1040,6 +1041,13 @@ public: handler->GetSession()->GetPlayer()->HandleEmoteCommand(animId); return true; } + + static bool HandleDebugLoSCommand(ChatHandler* handler, char const* args) + { + if (Unit* unit = handler->getSelectedUnit()) + handler->PSendSysMessage("Unit %s (GuidLow: %u) is %sin LoS", unit->GetName(), unit->GetGUIDLow(), handler->GetSession()->GetPlayer()->IsWithinLOSInMap(unit) ? "" : "not "); + return true; + } static bool HandleDebugSetAuraStateCommand(ChatHandler* handler, char const* args) { diff --git a/src/server/scripts/Commands/cs_gps.cpp b/src/server/scripts/Commands/cs_gps.cpp index 8f15f8c9ce3..589ed4af3b8 100644 --- a/src/server/scripts/Commands/cs_gps.cpp +++ b/src/server/scripts/Commands/cs_gps.cpp @@ -87,8 +87,8 @@ public: Map2ZoneCoordinates(zoneX, zoneY, zoneId); Map const* map = object->GetMap(); - float groundZ = map->GetHeight(object->GetPositionX(), object->GetPositionY(), MAX_HEIGHT); - float floorZ = map->GetHeight(object->GetPositionX(), object->GetPositionY(), object->GetPositionZ()); + float groundZ = map->GetHeight(object->GetPhaseMask(), object->GetPositionX(), object->GetPositionY(), MAX_HEIGHT); + float floorZ = map->GetHeight(object->GetPhaseMask(), object->GetPositionX(), object->GetPositionY(), object->GetPositionZ()); GridCoord gridCoord = Trinity::ComputeGridCoord(object->GetPositionX(), object->GetPositionY()); |
