Merge branch '4.3.4' of https://gitlab.com/trinitycore/TrinityCore_434 into 4.3.4
This commit is contained in:
commit
5fc89a1c85
5 files changed
+13
-15
No files matched your search
@@ -2470,6 +2470,7 @@ public:
|
||||
|
||||
virtual bool IsSpawned() const override { return _owner->isSpawned(); }
|
||||
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 float GetOrientation() const override { return _owner->GetOrientation(); }
|
||||
virtual float GetScale() const override { return _owner->GetObjectScale(); }
|
||||
|
||||
@@ -6342,7 +6342,7 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(WorldLocation const& lo
|
||||
uint32 MapId = location.GetMapId();
|
||||
|
||||
// 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)
|
||||
{
|
||||
@@ -9630,12 +9630,6 @@ void ObjectMgr::LoadTerrainWorldMaps()
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!sWorldMapAreaStore.LookupEntry(worldMapArea))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "WorldMapArea %u defined in `terrain_worldmap` does not exist, skipped.", worldMapArea);
|
||||
continue;
|
||||
}
|
||||
|
||||
TerrainSwapInfo* terrainSwapInfo = &_terrainSwapInfoById[mapId];
|
||||
terrainSwapInfo->Id = mapId;
|
||||
terrainSwapInfo->UiWorldMapAreaIDSwaps.push_back(worldMapArea);
|
||||
|
||||
@@ -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
|
||||
{
|
||||
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
|
||||
|
||||
@@ -82,6 +82,8 @@ public:
|
||||
typedef std::map<uint32, VisibleMapIdRef> VisibleMapIdContainer;
|
||||
typedef std::map<uint32, UiWorldMapAreaIdSwapRef> UiWorldMapAreaIdSwapContainer;
|
||||
|
||||
PhaseShift() : Flags(PhaseShiftFlags::Unphased), NonCosmeticReferences(0), CosmeticReferences(0), DefaultReferences(0), IsDbPhaseShift(false) { }
|
||||
|
||||
bool AddPhase(uint32 phaseId, PhaseFlags flags, std::vector<Condition*> const* areaConditions, int32 references = 1);
|
||||
EraseResult<PhaseContainer> RemovePhase(uint32 phaseId);
|
||||
bool HasPhase(uint32 phaseId) const { return Phases.find(PhaseRef(phaseId, PhaseFlags::None, nullptr)) != Phases.end(); }
|
||||
@@ -105,7 +107,7 @@ public:
|
||||
protected:
|
||||
friend class PhasingHandler;
|
||||
|
||||
EnumClassFlag<PhaseShiftFlags> Flags = PhaseShiftFlags::Unphased;
|
||||
EnumClassFlag<PhaseShiftFlags> Flags;
|
||||
ObjectGuid PersonalGuid;
|
||||
PhaseContainer Phases;
|
||||
VisibleMapIdContainer VisibleMapIds;
|
||||
@@ -113,10 +115,10 @@ protected:
|
||||
|
||||
void ModifyPhasesReferences(PhaseContainer::iterator itr, int32 references);
|
||||
void UpdateUnphasedFlag();
|
||||
int32 NonCosmeticReferences = 0;
|
||||
int32 CosmeticReferences = 0;
|
||||
int32 DefaultReferences = 0;
|
||||
bool IsDbPhaseShift = false;
|
||||
int32 NonCosmeticReferences;
|
||||
int32 CosmeticReferences;
|
||||
int32 DefaultReferences;
|
||||
bool IsDbPhaseShift;
|
||||
};
|
||||
|
||||
#endif // PhaseShift_h__
|
||||
@@ -230,14 +230,15 @@ void PhasingHandler::OnAreaChange(WorldObject* object)
|
||||
object->GetPhaseShift().ClearPhases();
|
||||
object->GetSuppressedPhaseShift().ClearPhases();
|
||||
|
||||
AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(object->GetAreaId());
|
||||
uint32 areaId = object->GetAreaId();
|
||||
AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(areaId);
|
||||
while (areaEntry)
|
||||
{
|
||||
if (std::vector<PhaseAreaInfo> const* newAreaPhases = sObjectMgr->GetPhasesForArea(areaEntry->ID))
|
||||
{
|
||||
for (PhaseAreaInfo const& phaseArea : *newAreaPhases)
|
||||
{
|
||||
if (phaseArea.SubAreaExclusions.find(areaEntry->ID) != phaseArea.SubAreaExclusions.end())
|
||||
if (phaseArea.SubAreaExclusions.find(areaId) != phaseArea.SubAreaExclusions.end())
|
||||
continue;
|
||||
|
||||
uint32 phaseId = phaseArea.PhaseInfo->Id;
|
||||
|
||||
Reference in new issue
Block a user