Core/Objects: Rename Object::m_isWorldObject and related functions to avoid conflicting with "WorldObject" class name

Port From (https://github.com/TrinityCore/TrinityCore/commit/9402c66e8423243d13dbc19e8713e298bea0ac7b)
This commit is contained in:
hondacrx
2024-03-14 11:09:45 -04:00
parent 26fe8a45b5
commit 4bbf49a17a
5 changed files with 19 additions and 19 deletions
+6 -6
View File
@@ -78,7 +78,7 @@ namespace Game.Maps
for (var i = 0; i < i_worldObjects.Count; ++i)
{
WorldObject obj = i_worldObjects[i];
Cypher.Assert(obj.IsWorldObject());
Cypher.Assert(obj.IsStoredInWorldObjectGridContainer());
obj.RemoveFromWorld();
obj.ResetMap();
}
@@ -120,7 +120,7 @@ namespace Game.Maps
// ObjectGridLoader loads all corpses from _corpsesByCell even if they were already added to grid before it was loaded
// so we need to explicitly check it here (Map::AddToGrid is only called from Player::BuildPlayerRepop, not from ObjectGridLoader)
// to avoid failing an assertion in GridObject::AddToGrid
if (obj.IsWorldObject())
if (obj.IsStoredInWorldObjectGridContainer())
{
obj.SetCurrentCell(cell);
grid.GetGridCell(cell.GetCellX(), cell.GetCellY()).AddWorldObject(obj);
@@ -135,7 +135,7 @@ namespace Game.Maps
break;
case TypeId.DynamicObject:
default:
if (obj.IsWorldObject())
if (obj.IsStoredInWorldObjectGridContainer())
grid.GetGridCell(cell.GetCellX(), cell.GetCellY()).AddWorldObject(obj);
else
grid.GetGridCell(cell.GetCellX(), cell.GetCellY()).AddGridObject(obj);
@@ -154,7 +154,7 @@ namespace Game.Maps
if (grid == null)
return;
if (obj.IsWorldObject())
if (obj.IsStoredInWorldObjectGridContainer())
grid.GetGridCell(cell.GetCellX(), cell.GetCellY()).RemoveWorldObject(obj);
else
grid.GetGridCell(cell.GetCellX(), cell.GetCellY()).RemoveGridObject(obj);
@@ -164,7 +164,7 @@ namespace Game.Maps
void SwitchGridContainers(WorldObject obj, bool on)
{
if (obj.IsPermanentWorldObject())
if (obj.IsAlwaysStoredInWorldObjectGridContainer())
return;
CellCoord p = GridDefines.ComputeCellCoord(obj.GetPositionX(), obj.GetPositionY());
@@ -2530,7 +2530,7 @@ namespace Game.Maps
bool on = pair.Value;
i_objectsToSwitch.Remove(pair.Key);
if (!obj.IsPermanentWorldObject())
if (!obj.IsAlwaysStoredInWorldObjectGridContainer())
{
switch (obj.GetTypeId())
{