diff options
| author | Shauren <shauren.trinity@gmail.com> | 2020-06-12 01:29:18 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2020-06-12 01:29:18 +0200 |
| commit | c7306439e7004288fb85890d6a5f730cf1761d71 (patch) | |
| tree | a1b6fd4af385923f321ff24ef4d66d09374397b9 /src/server/game/Loot/LootMgr.cpp | |
| parent | 1cdd1d0249ad49c860e117e1e39d451e1a3fbe43 (diff) | |
Core/Spells: Implement using different difficulty data from all spell related db2s, not just SpellEffect and SpellPower
Diffstat (limited to 'src/server/game/Loot/LootMgr.cpp')
| -rw-r--r-- | src/server/game/Loot/LootMgr.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index b7f20ee3fd0..0ed93f24730 100644 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -1094,9 +1094,9 @@ void LoadLootTemplates_Spell() uint32 count = LootTemplates_Spell.LoadAndCollectLootIds(lootIdSet); // remove real entries and check existence loot - for (uint32 spell_id = 1; spell_id < sSpellMgr->GetSpellInfoStoreSize(); ++spell_id) + for (SpellNameEntry const* spellNameEntry : sSpellNameStore) { - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellNameEntry->ID, DIFFICULTY_NONE); if (!spellInfo) continue; @@ -1104,15 +1104,15 @@ void LoadLootTemplates_Spell() if (!spellInfo->IsLootCrafting()) continue; - if (lootIdSet.find(spell_id) == lootIdSet.end()) + if (lootIdSet.find(spellInfo->Id) == lootIdSet.end()) { // not report about not trainable spells (optionally supported by DB) // ignore 61756 (Northrend Inscription Research (FAST QA VERSION) for example if (!spellInfo->HasAttribute(SPELL_ATTR0_NOT_SHAPESHIFT) || (spellInfo->HasAttribute(SPELL_ATTR0_TRADESPELL))) - LootTemplates_Spell.ReportNonExistingId(spell_id, "Spell", spellInfo->Id); + LootTemplates_Spell.ReportNonExistingId(spellInfo->Id, "Spell", spellInfo->Id); } else - lootIdSet.erase(spell_id); + lootIdSet.erase(spellInfo->Id); } // output error for any still listed (not referenced from appropriate table) ids |
