aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2015-11-30 00:18:08 +0100
committerShauren <shauren.trinity@gmail.com>2015-11-30 00:18:08 +0100
commit3c1748d8bd73169651a275e80990307fdd748fce (patch)
tree2d6555a081b5cccb863cdbdf6a1631e724bfe778 /src
parent8dad53d226397f46daddb109ede4f5d9e89f318b (diff)
Core/DataStores: Added assertion for wrong max difficulty value
Diffstat (limited to 'src')
-rw-r--r--src/server/game/DataStores/DBCEnums.h2
-rw-r--r--src/server/game/DataStores/DBCStores.cpp4
2 files changed, 6 insertions, 0 deletions
diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h
index cf1933c5877..bb9a620c6ed 100644
--- a/src/server/game/DataStores/DBCEnums.h
+++ b/src/server/game/DataStores/DBCEnums.h
@@ -420,6 +420,8 @@ enum Difficulty : uint8
DIFFICULTY_EVENT_RAID = 18,
DIFFICULTY_EVENT_DUNGEON = 19,
DIFFICULTY_EVENT_SCENARIO = 20,
+ DIFFICULTY_MYTHIC = 23,
+ DIFFICULTY_TIMEWALKER = 24,
MAX_DIFFICULTY
};
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index 74ae6983406..b473518673b 100644
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -406,6 +406,10 @@ void LoadDBCStores(const std::string& dataPath, uint32 defaultLocale)
if (ChrSpecializationEntry const* chrSpec = sChrSpecializationStore.LookupEntry(i))
sChrSpecializationByIndexStore[chrSpec->ClassID][chrSpec->OrderIndex] = chrSpec;
+ ASSERT(MAX_DIFFICULTY >= sDifficultyStore.GetNumRows(),
+ "MAX_DIFFICULTY is not large enough to contain all difficulties! (current value %d, required %d)",
+ MAX_DIFFICULTY, sDifficultyStore.GetNumRows());
+
for (uint32 i = 0; i < sFactionStore.GetNumRows(); ++i)
{
FactionEntry const* faction = sFactionStore.LookupEntry(i);