DB/Spells: correct more spelldifficulty_dbc entries
* add log message to find wrong entries
This commit is contained in:
1 parent
853b9e9c58
commit
738afccfc1
3 files changed
+11
-2
No files matched your search
@@ -0,0 +1,6 @@
|
||||
DELETE FROM `spelldifficulty_dbc` WHERE `spellid0` IN (31956,36127,49380,59803,49381);
|
||||
INSERT INTO `spelldifficulty_dbc` (`id`, `spellid0`, `spellid1`, `spellid2`, `spellid3`) VALUES
|
||||
(31956,31956,38801,0,0),
|
||||
(36127,36127,39005,0,0),
|
||||
(49380,49380,59803,0,0),
|
||||
(49381,49381,59805,0,0);
|
||||
@@ -482,7 +482,8 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
continue;
|
||||
|
||||
for (int x = 0; x < MAX_DIFFICULTY; ++x)
|
||||
sSpellMgr->SetSpellDifficultyId(uint32(newEntry.SpellID[x]), spellDiff->ID);
|
||||
if (newEntry.SpellID[x])
|
||||
sSpellMgr->SetSpellDifficultyId(uint32(newEntry.SpellID[x]), spellDiff->ID);
|
||||
}
|
||||
|
||||
// create talent spells set
|
||||
|
||||
@@ -455,6 +455,8 @@ uint32 SpellMgr::GetSpellDifficultyId(uint32 spellId) const
|
||||
|
||||
void SpellMgr::SetSpellDifficultyId(uint32 spellId, uint32 id)
|
||||
{
|
||||
if (uint32 i = GetSpellDifficultyId(spellId))
|
||||
TC_LOG_ERROR("spells", "SpellMgr::SetSpellDifficultyId: Spell %u has already spellDifficultyId %u. Will override with spellDifficultyId %u.", spellId, i, id);
|
||||
mSpellDifficultySearcherMap[spellId] = id;
|
||||
}
|
||||
|
||||
@@ -480,7 +482,7 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) con
|
||||
SpellDifficultyEntry const* difficultyEntry = sSpellDifficultyStore.LookupEntry(difficultyId);
|
||||
if (!difficultyEntry)
|
||||
{
|
||||
TC_LOG_DEBUG("spells", "SpellMgr::GetSpellIdForDifficulty: SpellDifficultyEntry not found for spell %u. This should never happen.", spellId);
|
||||
TC_LOG_ERROR("spells", "SpellMgr::GetSpellIdForDifficulty: SpellDifficultyEntry not found for spell %u. This should never happen.", spellId);
|
||||
return spellId; //return source spell
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user