fix(Core/Maps): Improve large object updater (#22659)
This commit is contained in:
@@ -3903,7 +3903,7 @@ bool Creature::IsUpdateNeeded()
|
|||||||
if (IsInCombat())
|
if (IsInCombat())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (IsVisibilityOverridden())
|
if (!GetObjectVisibilityContainer().GetVisiblePlayersMap().empty())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (ToTempSummon())
|
if (ToTempSummon())
|
||||||
|
|||||||
@@ -3086,7 +3086,7 @@ bool GameObject::IsUpdateNeeded()
|
|||||||
if (GetMap()->isCellMarked(GetCurrentCell().GetCellCoord().GetId()))
|
if (GetMap()->isCellMarked(GetCurrentCell().GetCellCoord().GetId()))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (IsVisibilityOverridden())
|
if (!GetObjectVisibilityContainer().GetVisiblePlayersMap().empty())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (IsTransport())
|
if (IsTransport())
|
||||||
|
|||||||
@@ -479,7 +479,7 @@ public:
|
|||||||
_updateObjects.erase(obj);
|
_updateObjects.erase(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t GetUpdateObjectsCount() const { return _updateObjects.size(); }
|
size_t GetUpdatableObjectsCount() const { return _updatableObjectList.size(); }
|
||||||
|
|
||||||
virtual std::string GetDebugInfo() const;
|
virtual std::string GetDebugInfo() const;
|
||||||
|
|
||||||
|
|||||||
@@ -1351,7 +1351,7 @@ public:
|
|||||||
map->GetId(), map->GetMapName(), map->GetInstanceId(),
|
map->GetId(), map->GetMapName(), map->GetInstanceId(),
|
||||||
uint64(map->GetObjectsStore().Size<Creature>()),
|
uint64(map->GetObjectsStore().Size<Creature>()),
|
||||||
uint64(map->GetObjectsStore().Size<GameObject>()),
|
uint64(map->GetObjectsStore().Size<GameObject>()),
|
||||||
uint64(map->GetUpdateObjectsCount()));
|
uint64(map->GetUpdatableObjectsCount()));
|
||||||
|
|
||||||
CreatureCountWorker worker;
|
CreatureCountWorker worker;
|
||||||
TypeContainerVisitor<CreatureCountWorker, MapStoredObjectTypesContainer> visitor(worker);
|
TypeContainerVisitor<CreatureCountWorker, MapStoredObjectTypesContainer> visitor(worker);
|
||||||
|
|||||||
Reference in New Issue
Block a user