# Conflicts:
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Maps/Map.cpp
#	src/server/game/Maps/Map.h
This commit is contained in:
Ovahlord committed 2018-03-14 08:22:00 +01:00
commit 617b3a8a11
172 files changed
+4534 -1342

No files matched your search

+13 -27
View File
@@ -32,6 +32,7 @@
#include "WeatherMgr.h"
#include "Player.h"
#include "Pet.h"
#include "PhasingHandler.h"
#include "LFG.h"
#include "GroupMgr.h"
#include "MMapFactory.h"
@@ -238,8 +239,8 @@ public:
Map2ZoneCoordinates(zoneX, zoneY, zoneId);
Map const* map = object->GetMap();
float groundZ = map->GetHeight(object->GetPhases(), object->GetPositionX(), object->GetPositionY(), MAX_HEIGHT);
float floorZ = map->GetHeight(object->GetPhases(), object->GetPositionX(), object->GetPositionY(), object->GetPositionZ());
float groundZ = map->GetHeight(object->GetPhaseShift(), object->GetPositionX(), object->GetPositionY(), MAX_HEIGHT);
float floorZ = map->GetHeight(object->GetPhaseShift(), object->GetPositionX(), object->GetPositionY(), object->GetPositionZ());
GridCoord gridCoord = Trinity::ComputeGridCoord(object->GetPositionX(), object->GetPositionY());
@@ -252,7 +253,7 @@ public:
if (haveVMap)
{
if (map->IsOutdoors(object->GetPositionX(), object->GetPositionY(), object->GetPositionZ()))
if (map->IsOutdoors(object->GetPhaseShift(), object->GetPositionX(), object->GetPositionY(), object->GetPositionZ()))
handler->PSendSysMessage(LANG_GPS_POSITION_OUTDOORS);
else
handler->PSendSysMessage(LANG_GPS_POSITION_INDOORS);
@@ -266,7 +267,6 @@ public:
mapId, (mapEntry ? mapEntry->name : unknown),
zoneId, (zoneEntry ? zoneEntry->area_name : unknown),
areaId, (areaEntry ? areaEntry->area_name : unknown),
object->GetPhaseMask(), StringJoin(object->GetPhases(), ", ").c_str(),
object->GetPositionX(), object->GetPositionY(), object->GetPositionZ(), object->GetOrientation());
if (Transport* transport = object->GetTransport())
handler->PSendSysMessage(LANG_TRANSPORT_POSITION,
@@ -277,25 +277,12 @@ public:
zoneX, zoneY, groundZ, floorZ, haveMap, haveVMap, haveMMap);
LiquidData liquidStatus;
ZLiquidStatus status = map->GetLiquidStatus(object->GetPositionX(), object->GetPositionY(), object->GetPositionZ(), MAP_ALL_LIQUIDS, &liquidStatus);
ZLiquidStatus status = map->GetLiquidStatus(object->GetPhaseShift(), object->GetPositionX(), object->GetPositionY(), object->GetPositionZ(), MAP_ALL_LIQUIDS, &liquidStatus);
if (status)
handler->PSendSysMessage(LANG_LIQUID_STATUS, liquidStatus.level, liquidStatus.depth_level, liquidStatus.entry, liquidStatus.type_flags, status);
if (!object->GetTerrainSwaps().empty())
{
std::stringstream ss;
for (uint32 swap : object->GetTerrainSwaps())
ss << swap << " ";
handler->PSendSysMessage("Target's active terrain swaps: %s", ss.str().c_str());
}
if (!object->GetWorldMapAreaSwaps().empty())
{
std::stringstream ss;
for (uint32 swap : object->GetWorldMapAreaSwaps())
ss << swap << " ";
handler->PSendSysMessage("Target's active world map area swaps: %s", ss.str().c_str());
}
PhasingHandler::PrintToChat(handler, object->GetPhaseShift());
return true;
}
@@ -453,8 +440,8 @@ public:
target->GetContactPoint(_player, x, y, z);
_player->TeleportTo(target->GetMapId(), x, y, z, _player->GetAngle(target), TELE_TO_GM_MODE);
_player->CopyPhaseFrom(target, true);
PhasingHandler::InheritPhaseShift(_player, target);
_player->UpdateObjectVisibility();
}
else
{
@@ -584,7 +571,8 @@ public:
float x, y, z;
_player->GetClosePoint(x, y, z, target->GetObjectSize());
target->TeleportTo(_player->GetMapId(), x, y, z, target->GetOrientation());
target->SetPhaseMask(_player->GetPhaseMask(), true);
PhasingHandler::InheritPhaseShift(target, handler->GetSession()->GetPlayer());
target->UpdateObjectVisibility();
}
else
{
@@ -1608,7 +1596,6 @@ public:
// Position data print
uint32 mapId;
uint32 areaId;
std::set<uint32> phases;
std::string areaName = handler->GetTrinityString(LANG_UNKNOWN);
std::string zoneName = handler->GetTrinityString(LANG_UNKNOWN);
@@ -1640,7 +1627,6 @@ public:
areaId = target->GetAreaId();
alive = target->IsAlive() ? handler->GetTrinityString(LANG_YES) : handler->GetTrinityString(LANG_NO);
gender = target->getGender();
phases = target->GetPhases();
}
// get additional information from DB
else
@@ -1827,9 +1813,9 @@ public:
// Output XII. LANG_PINFO_CHR_ALIVE
handler->PSendSysMessage(LANG_PINFO_CHR_ALIVE, alive.c_str());
// Output XIII. LANG_PINFO_CHR_PHASES
if (target && !phases.empty())
handler->PSendSysMessage(LANG_PINFO_CHR_PHASES, StringJoin(phases, ", ").c_str());
// Output XIII. phases
if (target)
PhasingHandler::PrintToChat(handler, target->GetPhaseShift());
// Output XIV. LANG_PINFO_CHR_MONEY
uint32 gold = money / GOLD;