Core/Phases: implemented new commands:
.npc set phase .npc set phasegroup - implemented saving creature phasing to database
This commit is contained in:
1 parent
5993b946c9
commit
8ba89d2311
5 files changed
+75
-18
No files matched your search
@@ -1286,7 +1286,7 @@ void MovementInfo::OutDebug()
|
||||
WorldObject::WorldObject(bool isWorldObject) : WorldLocation(), LastUsedScriptID(0),
|
||||
m_name(""), m_isActive(false), m_isWorldObject(isWorldObject), m_zoneScript(NULL),
|
||||
m_transport(NULL), m_currMap(NULL), m_InstanceId(0),
|
||||
m_phaseMask(PHASEMASK_NORMAL), m_notifyflags(0), m_executed_notifies(0)
|
||||
m_phaseMask(PHASEMASK_NORMAL), _dbPhase(0), m_notifyflags(0), m_executed_notifies(0)
|
||||
{
|
||||
m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_ALIVE | GHOST_VISIBILITY_GHOST);
|
||||
m_serverSideVisibilityDetect.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_ALIVE);
|
||||
@@ -2720,11 +2720,13 @@ void WorldObject::SetPhaseMask(uint32 newPhaseMask, bool update)
|
||||
|
||||
void WorldObject::SetInPhase(uint32 id, bool update, bool apply)
|
||||
{
|
||||
if (apply)
|
||||
_phases.insert(id);
|
||||
else
|
||||
_phases.erase(id);
|
||||
|
||||
if (id)
|
||||
{
|
||||
if (apply)
|
||||
_phases.insert(id);
|
||||
else
|
||||
_phases.erase(id);
|
||||
}
|
||||
RebuildTerrainSwaps();
|
||||
|
||||
if (update && IsInWorld())
|
||||
@@ -2743,6 +2745,16 @@ void WorldObject::CopyPhaseFrom(WorldObject* obj, bool update)
|
||||
UpdateObjectVisibility();
|
||||
}
|
||||
|
||||
void WorldObject::ClearPhases(bool update)
|
||||
{
|
||||
_phases.clear();
|
||||
|
||||
RebuildTerrainSwaps();
|
||||
|
||||
if (update && IsInWorld())
|
||||
UpdateObjectVisibility();
|
||||
}
|
||||
|
||||
bool WorldObject::IsInPhase(WorldObject const* obj) const
|
||||
{
|
||||
// PhaseId 169 is the default fallback phase
|
||||
|
||||
Reference in new issue
Block a user