Skip to content

Commit

Permalink
SpawnGroup: Fix linux compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Dec 5, 2024
1 parent 8ea4cc9 commit 7d6e49a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/game/Globals/ObjectMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ void ObjectMgr::LoadSpawnGroups()

entry.Active = false;
entry.EnabledByDefault = true;
entry.FormationEntry = nullptr;
entry.Formation = nullptr;
entry.HasChancedSpawns = false;
newContainer->spawnGroupMap.emplace(entry.Id, std::move(entry));
} while (result->NextRow());
Expand Down Expand Up @@ -1307,7 +1307,7 @@ void ObjectMgr::LoadSpawnGroups()
continue;
}

itr->second.FormationEntry = std::make_unique<FormationEntry>(std::move(fEntry));
itr->second.Formation = std::make_unique<FormationEntry>(std::move(fEntry));
} while (result->NextRow());
}

Expand Down Expand Up @@ -1390,7 +1390,7 @@ void ObjectMgr::LoadSpawnGroups()
// check and fix correctness of slot id indexation
for (auto& sg : newContainer->spawnGroupMap)
{
if (sg.second.FormationEntry == nullptr)
if (sg.second.Formation == nullptr)
continue;

auto& guidMap = sg.second.DbGuids;
Expand Down
4 changes: 2 additions & 2 deletions src/game/Maps/SpawnGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,8 @@ std::string SpawnGroup::to_string() const

CreatureGroup::CreatureGroup(SpawnGroupEntry const& entry, Map& map) : SpawnGroup(entry, map, uint32(TYPEID_UNIT))
{
if (entry.FormationEntry)
m_formationData = std::make_shared<FormationData>(this, *(entry.FormationEntry.get()));
if (entry.Formation)
m_formationData = std::make_shared<FormationData>(this, *(entry.Formation.get()));
else
m_formationData = nullptr;
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/Maps/SpawnGroupDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ struct SpawnGroupEntry
std::vector<uint32> LinkedGroups;

// may be nullptr
std::unique_ptr<FormationEntry> FormationEntry;
std::unique_ptr<FormationEntry> Formation;

int32 GetFormationSlotId(uint32 dbGuid) const
{
Expand Down

0 comments on commit 7d6e49a

Please sign in to comment.