diff options
| author | Vincent_Michael <Vincent_Michael@gmx.de> | 2013-01-02 14:12:48 +0100 |
|---|---|---|
| committer | Vincent_Michael <Vincent_Michael@gmx.de> | 2013-01-02 14:12:48 +0100 |
| commit | b873156c3c1654553319158275f29ac2f818f3ce (patch) | |
| tree | 204be4b38ee32328a980fe65b46e41336c5a38e8 /src/server/game/Groups/Group.cpp | |
| parent | 05efdaf39349f057eabf58252532dff76511e7ef (diff) | |
| parent | ebd14b4f01cc64a2a488bdbb1046897cc4da8e9a (diff) | |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into mmaps
Conflicts:
src/server/game/Movement/Spline/MoveSplineInit.h
Diffstat (limited to 'src/server/game/Groups/Group.cpp')
| -rw-r--r-- | src/server/game/Groups/Group.cpp | 20 |
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 |
