Core/Entities: Phase Rework (main commit)
This commit is contained in:
1 parent
4a268b3fd3
commit
e44bb5f387
79 files changed
+1738
-851
No files matched your search
@@ -27,6 +27,7 @@
|
||||
#include "GroupMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "PoolMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellMgr.h"
|
||||
@@ -907,15 +908,8 @@ bool GameObject::LoadGameObjectFromDB(ObjectGuid::LowType spawnId, Map* map, boo
|
||||
if (!Create(map->GenerateLowGuid<HighGuid::GameObject>(), entry, map, phaseMask, pos, data->rotation, animprogress, go_state, artKit))
|
||||
return false;
|
||||
|
||||
if (data->phaseid)
|
||||
SetInPhase(data->phaseid, false, true);
|
||||
|
||||
if (data->phaseGroup)
|
||||
{
|
||||
// Set the gameobject in all the phases of the phasegroup
|
||||
for (auto ph : GetPhasesForGroup(data->phaseGroup))
|
||||
SetInPhase(ph, false, true);
|
||||
}
|
||||
PhasingHandler::InitDbPhaseShift(GetPhaseShift(), data->phaseUseFlags, data->phaseId, data->phaseGroup);
|
||||
PhasingHandler::InitDbVisibleMapId(GetPhaseShift(), data->terrainSwapMap);
|
||||
|
||||
if (data->spawntimesecs >= 0)
|
||||
{
|
||||
@@ -2476,7 +2470,6 @@ public:
|
||||
|
||||
virtual bool IsSpawned() const override { return _owner->isSpawned(); }
|
||||
virtual uint32 GetDisplayId() const override { return _owner->GetDisplayId(); }
|
||||
virtual bool IsInPhase(std::set<uint32> const& phases) const override { return _owner->IsInPhase(phases); }
|
||||
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(); }
|
||||
|
||||
Reference in new issue
Block a user