aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Groups/Group.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Groups/Group.cpp')
-rw-r--r--src/server/game/Groups/Group.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index 7c4da5c6741..734a1bfbaad 100644
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -1993,28 +1993,24 @@ InstanceGroupBind* Group::GetBoundInstance(Map* aMap)
{
// Currently spawn numbering not different from map difficulty
Difficulty difficulty = GetDifficulty(aMap->IsRaid());
-
- // some instances only have one difficulty
- GetDownscaledMapDifficultyData(aMap->GetId(), difficulty);
-
- BoundInstancesMap::iterator itr = m_boundInstances[difficulty].find(aMap->GetId());
- if (itr != m_boundInstances[difficulty].end())
- return &itr->second;
- else
- return NULL;
+ return GetBoundInstance(difficulty, aMap->GetId());
}
InstanceGroupBind* Group::GetBoundInstance(MapEntry const* mapEntry)
{
- if (!mapEntry)
+ if (!mapEntry || !mapEntry->IsDungeon())
return NULL;
Difficulty difficulty = GetDifficulty(mapEntry->IsRaid());
+ return GetBoundInstance(difficulty, mapEntry->MapID);
+}
+InstanceGroupBind* Group::GetBoundInstance(Difficulty difficulty, uint32 mapId)
+{
// some instances only have one difficulty
- GetDownscaledMapDifficultyData(mapEntry->MapID, difficulty);
+ GetDownscaledMapDifficultyData(mapId, difficulty);
- BoundInstancesMap::iterator itr = m_boundInstances[difficulty].find(mapEntry->MapID);
+ BoundInstancesMap::iterator itr = m_boundInstances[difficulty].find(mapId);
if (itr != m_boundInstances[difficulty].end())
return &itr->second;
else