Core/DataStores: Updated db2 structures to 8.3.0
Port From (https://github.com/TrinityCore/TrinityCore/commit/90628b7d29e041310abc25438f219a0c73c41bae)
This commit is contained in:
@@ -653,15 +653,15 @@ namespace Game.Chat
|
||||
|
||||
if (!int.TryParse(difficulty_str, out int difficulty))
|
||||
difficulty = -1;
|
||||
if (difficulty >= (int)Difficulty.Max || difficulty < -1)
|
||||
if (CliDB.DifficultyStorage.HasRecord((uint)difficulty) || difficulty < -1)
|
||||
return false;
|
||||
|
||||
if (difficulty == -1)
|
||||
{
|
||||
for (byte diff = 0; diff < (int)Difficulty.Max; ++diff)
|
||||
foreach (var diffRecord in CliDB.DifficultyStorage.Values)
|
||||
{
|
||||
if (Global.DB2Mgr.GetMapDifficultyData((uint)map, (Difficulty)diff) != null)
|
||||
Global.InstanceSaveMgr.ForceGlobalReset((uint)map, (Difficulty)diff);
|
||||
if (Global.DB2Mgr.GetMapDifficultyData((uint)map, (Difficulty)diffRecord.Id) != null)
|
||||
Global.InstanceSaveMgr.ForceGlobalReset((uint)map, (Difficulty)diffRecord.Id);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user