aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Groups/Group.cpp
diff options
context:
space:
mode:
authorSpp <spp@jorge.gr>2013-01-02 11:00:16 +0100
committerSpp <spp@jorge.gr>2013-01-02 11:00:16 +0100
commit5280a77fe1e9e4a26d98b59a31715d5632238bb2 (patch)
treeb7d19ff1b96fb4c92cae9c201a60df960efb4555 /src/server/game/Groups/Group.cpp
parentd36c4a91ba76680e64b108db3d866d208f4f86cc (diff)
Core/Misc: Some minor changes here and there
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