Skip to content

Commit

Permalink
SpawnGroup/Creature/GameObject: Spawn group dbguids should not be aff…
Browse files Browse the repository at this point in the history
…ected by dynguid flag ccode
  • Loading branch information
killerwife committed Jan 1, 2024
1 parent 6bb83e2 commit 3615f1c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/game/Globals/ObjectMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1464,6 +1464,8 @@ void ObjectMgr::LoadSpawnGroups()
{
CreatureData const* data = GetCreatureData(guidData.DbGuid);
RemoveCreatureFromGrid(guidData.DbGuid, data);
auto& creatureDynguidsForMap = m_dynguidCreatureDbGuids[data->mapid];
creatureDynguidsForMap.erase(std::remove(creatureDynguidsForMap.begin(), creatureDynguidsForMap.end(), guidData.DbGuid), creatureDynguidsForMap.end());
newContainer->spawnGroupByGuidMap.emplace(std::make_pair(guidData.DbGuid, uint32(TYPEID_UNIT)), &entry);
if (sWorld.getConfig(CONFIG_BOOL_AUTOLOAD_ACTIVE))
{
Expand All @@ -1490,6 +1492,8 @@ void ObjectMgr::LoadSpawnGroups()
{
GameObjectData const* data = GetGOData(guidData.DbGuid);
RemoveGameobjectFromGrid(guidData.DbGuid, data);
auto& goDynguidsForMap = m_dynguidGameobjectDbGuids[data->mapid];
goDynguidsForMap.erase(std::remove(goDynguidsForMap.begin(), goDynguidsForMap.end(), guidData.DbGuid), goDynguidsForMap.end());
newContainer->spawnGroupByGuidMap.emplace(std::make_pair(guidData.DbGuid, uint32(TYPEID_GAMEOBJECT)), &entry);
if (sWorld.getConfig(CONFIG_BOOL_AUTOLOAD_ACTIVE))
{
Expand Down

0 comments on commit 3615f1c

Please sign in to comment.