Core/Spells: Fix potions exploit
Fix an exploit that allowed to consume different potions even if they share the same cooldown. Closes #15265
This commit is contained in:
1 parent
cf749325c4
commit
43e8c841f5
1 file changed
+8
@@ -2754,6 +2754,14 @@ void ObjectMgr::LoadItemTemplates()
|
||||
TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has broken spell in spellid_%d (%d)", entry, j+1, itemTemplate.Spells[j].SpellId);
|
||||
itemTemplate.Spells[j].SpellId = 0;
|
||||
}
|
||||
|
||||
if (spellInfo && itemTemplate.Spells[j].SpellCategory)
|
||||
{
|
||||
bool added = sSpellsByCategoryStore[itemTemplate.Spells[j].SpellCategory].insert(itemTemplate.Spells[j].SpellId).second;
|
||||
if (added)
|
||||
TC_LOG_DEBUG("sql.sql", "Item(Entry: %u) spellid_%d (%d) category %u added to sSpellsByCategoryStore",
|
||||
entry, j + 1, itemTemplate.Spells[j].SpellId, itemTemplate.Spells[j].SpellCategory);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user