feat(Core/Grids): Allow arbitrary containers in grid searchers that support push_back

This commit is contained in:
IntelligentQuantum
2022-02-10 02:38:57 +03:30
committed by GitHub
parent fb890b3310
commit 759b945a13
2 changed files with 61 additions and 30 deletions

View File

@@ -253,7 +253,7 @@ void Acore::WorldObjectListSearcher<Check>::Visit(PlayerMapType& m)
for (PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
if (i_check(itr->GetSource()))
i_objects.push_back(itr->GetSource());
Insert(itr->GetSource());
}
template<class Check>
@@ -264,7 +264,7 @@ void Acore::WorldObjectListSearcher<Check>::Visit(CreatureMapType& m)
for (CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
if (i_check(itr->GetSource()))
i_objects.push_back(itr->GetSource());
Insert(itr->GetSource());
}
template<class Check>
@@ -275,7 +275,7 @@ void Acore::WorldObjectListSearcher<Check>::Visit(CorpseMapType& m)
for (CorpseMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
if (i_check(itr->GetSource()))
i_objects.push_back(itr->GetSource());
Insert(itr->GetSource());
}
template<class Check>
@@ -286,7 +286,7 @@ void Acore::WorldObjectListSearcher<Check>::Visit(GameObjectMapType& m)
for (GameObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
if (i_check(itr->GetSource()))
i_objects.push_back(itr->GetSource());
Insert(itr->GetSource());
}
template<class Check>
@@ -297,7 +297,7 @@ void Acore::WorldObjectListSearcher<Check>::Visit(DynamicObjectMapType& m)
for (DynamicObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
if (i_check(itr->GetSource()))
i_objects.push_back(itr->GetSource());
Insert(itr->GetSource());
}
// Gameobject searchers
@@ -341,7 +341,7 @@ void Acore::GameObjectListSearcher<Check>::Visit(GameObjectMapType& m)
for (GameObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
if (itr->GetSource()->InSamePhase(i_phaseMask))
if (i_check(itr->GetSource()))
i_objects.push_back(itr->GetSource());
Insert(itr->GetSource());
}
// Unit searchers
@@ -418,7 +418,7 @@ void Acore::UnitListSearcher<Check>::Visit(PlayerMapType& m)
for (PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
if (itr->GetSource()->InSamePhase(i_phaseMask))
if (i_check(itr->GetSource()))
i_objects.push_back(itr->GetSource());
Insert(itr->GetSource());
}
template<class Check>
@@ -427,7 +427,7 @@ void Acore::UnitListSearcher<Check>::Visit(CreatureMapType& m)
for (CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
if (itr->GetSource()->InSamePhase(i_phaseMask))
if (i_check(itr->GetSource()))
i_objects.push_back(itr->GetSource());
Insert(itr->GetSource());
}
// Creature searchers
@@ -471,7 +471,7 @@ void Acore::CreatureListSearcher<Check>::Visit(CreatureMapType& m)
for (CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
if (itr->GetSource()->InSamePhase(i_phaseMask))
if (i_check(itr->GetSource()))
i_objects.push_back(itr->GetSource());
Insert(itr->GetSource());
}
template<class Check>
@@ -480,7 +480,7 @@ void Acore::PlayerListSearcher<Check>::Visit(PlayerMapType& m)
for (PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
if (itr->GetSource()->InSamePhase(i_phaseMask))
if (i_check(itr->GetSource()))
i_objects.push_back(itr->GetSource());
Insert(itr->GetSource());
}
template<class Check>