Core/Spells: Implement using different difficulty data from all spell related db2s, not just SpellEffect and SpellPower

Port From (https://github.com/TrinityCore/TrinityCore/commit/c7306439e7004288fb85890d6a5f730cf1761d71)
This commit is contained in:
hondacrx
2020-06-18 12:39:39 -04:00
parent f0942a257e
commit d7954f4fc7
89 changed files with 1738 additions and 1893 deletions
+6 -1
View File
@@ -20,6 +20,7 @@ using Framework.Database;
using Game.Conditions;
using Game.DataStorage;
using Game.Entities;
using Game.Spells;
using System;
using System.Collections.Generic;
@@ -378,8 +379,12 @@ namespace Game.Loots
uint count = Spell.LoadAndCollectLootIds(out lootIdSet);
// remove real entries and check existence loot
foreach (var spellInfo in Global.SpellMgr.GetSpellInfoStorage().Values)
foreach (SpellNameRecord spellNameEntry in CliDB.SpellNameStorage.Values)
{
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(spellNameEntry.Id, Difficulty.None);
if (spellInfo == null)
continue;
// possible cases
if (!spellInfo.IsLootCrafting())
continue;