Core/DataStores: Updated db2 structures to 8.3.0

This commit is contained in:
Shauren
2020-02-17 23:58:47 +01:00
parent 462a10de17
commit 90628b7d29
21 changed files with 1039 additions and 863 deletions
+6 -4
View File
@@ -1219,15 +1219,17 @@ public:
if (!mEntry || !mEntry->IsRaid())
return false;
int32 difficulty = difficulty_str ? atoi(difficulty_str) : -1;
if (difficulty >= MAX_DIFFICULTY || difficulty < -1)
if (!sDifficultyStore.HasRecord(difficulty) || difficulty < -1)
return false;
if (difficulty == -1)
for (uint8 diff = 0; diff < MAX_DIFFICULTY; ++diff)
{
for (DifficultyEntry const* difficulty : sDifficultyStore)
{
if (sDB2Manager.GetMapDifficultyData(map, Difficulty(diff)))
sInstanceSaveMgr->ForceGlobalReset(map, Difficulty(diff));
if (sDB2Manager.GetMapDifficultyData(map, Difficulty(difficulty->ID)))
sInstanceSaveMgr->ForceGlobalReset(map, Difficulty(difficulty->ID));
}
}
else
sInstanceSaveMgr->ForceGlobalReset(map, Difficulty(difficulty));
return true;