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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user