* Core/Phasing: fixed gameobject floor detection
*merged a crash fix
This commit is contained in:
1 parent
e837c9948f
commit
89c6777803
3 files changed
+3
-2
No files matched your search
@@ -2470,6 +2470,7 @@ public:
|
|||||||
|
|
||||||
virtual bool IsSpawned() const override { return _owner->isSpawned(); }
|
virtual bool IsSpawned() const override { return _owner->isSpawned(); }
|
||||||
virtual uint32 GetDisplayId() const override { return _owner->GetDisplayId(); }
|
virtual uint32 GetDisplayId() const override { return _owner->GetDisplayId(); }
|
||||||
|
virtual bool IsInPhase(PhaseShift const& phaseShift) const override { return _owner->GetPhaseShift().CanSee(phaseShift); }
|
||||||
virtual G3D::Vector3 GetPosition() const override { return G3D::Vector3(_owner->GetPositionX(), _owner->GetPositionY(), _owner->GetPositionZ()); }
|
virtual G3D::Vector3 GetPosition() const override { return G3D::Vector3(_owner->GetPositionX(), _owner->GetPositionY(), _owner->GetPositionZ()); }
|
||||||
virtual float GetOrientation() const override { return _owner->GetOrientation(); }
|
virtual float GetOrientation() const override { return _owner->GetOrientation(); }
|
||||||
virtual float GetScale() const override { return _owner->GetObjectScale(); }
|
virtual float GetScale() const override { return _owner->GetObjectScale(); }
|
||||||
|
|||||||
@@ -6342,7 +6342,7 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(WorldLocation const& lo
|
|||||||
uint32 MapId = location.GetMapId();
|
uint32 MapId = location.GetMapId();
|
||||||
|
|
||||||
// search for zone associated closest graveyard
|
// search for zone associated closest graveyard
|
||||||
uint32 zoneId = sMapMgr->GetZoneId(conditionObject->GetPhaseShift(), MapId, x, y, z);
|
uint32 zoneId = sMapMgr->GetZoneId(conditionObject ? conditionObject->GetPhaseShift() : PhasingHandler::GetEmptyPhaseShift(), MapId, x, y, z);
|
||||||
|
|
||||||
if (!zoneId)
|
if (!zoneId)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2730,7 +2730,7 @@ bool Map::getObjectHitPos(PhaseShift const& phaseShift, float x1, float y1, floa
|
|||||||
|
|
||||||
float Map::GetHeight(PhaseShift const& phaseShift, float x, float y, float z, bool vmap /*= true*/, float maxSearchDist /*= DEFAULT_HEIGHT_SEARCH*/) const
|
float Map::GetHeight(PhaseShift const& phaseShift, float x, float y, float z, bool vmap /*= true*/, float maxSearchDist /*= DEFAULT_HEIGHT_SEARCH*/) const
|
||||||
{
|
{
|
||||||
return std::max<float>(GetStaticHeight(phaseShift, x, y, z, vmap, maxSearchDist), _dynamicTree.getHeight(x, y, z, maxSearchDist, phaseShift));
|
return std::max<float>(GetStaticHeight(phaseShift, x, y, z, vmap, maxSearchDist), GetGameObjectFloor(phaseShift, x, y, z, maxSearchDist));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Map::IsInWater(PhaseShift const& phaseShift, float x, float y, float pZ, LiquidData* data) const
|
bool Map::IsInWater(PhaseShift const& phaseShift, float x, float y, float pZ, LiquidData* data) const
|
||||||
|
|||||||
Reference in new issue
Block a user