This commit is contained in:
Ovahlord committed 2023-01-09 13:31:57 +01:00
1 parent 1f36c3a562
commit 684592851c
1 file changed
+4 -4
+4 -4
View File
@@ -6751,15 +6751,15 @@ void ObjectMgr::LoadAccessRequirements()
/*
* Searches for the areatrigger which teleports players out of the given map with instance_template.parent field support
*/
AreaTriggerStruct const* ObjectMgr::GetGoBackTrigger(uint32 Map) const
AreaTriggerStruct const* ObjectMgr::GetGoBackTrigger(uint32 map) const
{
Optional<uint32> parentId;
MapEntry const* mapEntry = sMapStore.LookupEntry(Map);
MapEntry const* mapEntry = sMapStore.LookupEntry(map);
if (!mapEntry || mapEntry->CorpseMapID < 0)
return nullptr;
if (mapEntry->IsDungeon())
if (InstanceTemplate const* iTemplate = sObjectMgr->GetInstanceTemplate(Map))
if (InstanceTemplate const* iTemplate = sObjectMgr->GetInstanceTemplate(map))
parentId = iTemplate->Parent;
uint32 entrance_map = parentId.value_or(mapEntry->CorpseMapID);
@@ -6769,7 +6769,7 @@ AreaTriggerStruct const* ObjectMgr::GetGoBackTrigger(uint32 Map) const
if (itr->second.target_mapId == entrance_map)
{
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(itr->first);
if (atEntry && atEntry->ContinentID == int32(Map))
if (atEntry && atEntry->ContinentID == map)
return &itr->second;
}
}