aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Groups/GroupMgr.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2015-01-10 01:35:47 +0100
committerShauren <shauren.trinity@gmail.com>2015-01-10 01:35:47 +0100
commitfaa583c7843af37d757bd46ca0bd226175dabc38 (patch)
tree5af657d84903b337bdb22c341bb01f4e6aab1392 /src/server/game/Groups/GroupMgr.cpp
parentf6b30fdf616bd289dd668f98a0aed8dbfb14eba8 (diff)
Core/Maps: Updated map difficulties
Diffstat (limited to 'src/server/game/Groups/GroupMgr.cpp')
-rw-r--r--src/server/game/Groups/GroupMgr.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/server/game/Groups/GroupMgr.cpp b/src/server/game/Groups/GroupMgr.cpp
index 217a2dfd442..f0a0aa5604f 100644
--- a/src/server/game/Groups/GroupMgr.cpp
+++ b/src/server/game/Groups/GroupMgr.cpp
@@ -220,11 +220,9 @@ void GroupMgr::LoadGroups()
}
uint32 diff = fields[4].GetUInt8();
- if (diff >= uint32(mapEntry->IsRaid() ? MAX_RAID_DIFFICULTY : MAX_DUNGEON_DIFFICULTY))
- {
- TC_LOG_ERROR("sql.sql", "Wrong dungeon difficulty use in group_instance table: %d", diff + 1);
- diff = 0; // default for both difficaly types
- }
+ DifficultyEntry const* difficultyEntry = sDifficultyStore.LookupEntry(diff);
+ if (!difficultyEntry || difficultyEntry->InstanceType != mapEntry->InstanceType)
+ continue;
InstanceSave* save = sInstanceSaveMgr->AddInstanceSave(mapEntry->ID, fields[2].GetUInt32(), Difficulty(diff), time_t(fields[5].GetUInt32()), fields[6].GetUInt64() != 0, true);
group->BindToInstance(save, fields[3].GetBool(), true);