Core/Items: Check required level to use items including any bonuses that modify it

Port From (https://github.com/TrinityCore/TrinityCore/commit/b702401978928781249798dd607b6c6fbd10f122)
This commit is contained in:
hondacrx
2020-04-26 01:07:12 -04:00
parent 24a1bb6331
commit 8bc9cc9c55
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -6046,7 +6046,7 @@ namespace Game.Spells
return SpellCastResult.ItemNotFound;
// required level has to be checked also! Exploit fix
if (targetItem.GetTemplate().GetBaseItemLevel() < m_spellInfo.BaseLevel || (targetItem.GetTemplate().GetBaseRequiredLevel() != 0 && (uint)targetItem.GetTemplate().GetBaseRequiredLevel() < m_spellInfo.BaseLevel))
if (targetItem.GetItemLevel(targetItem.GetOwner()) < m_spellInfo.BaseLevel || (targetItem.GetRequiredLevel() != 0 && targetItem.GetRequiredLevel() < m_spellInfo.BaseLevel))
return SpellCastResult.Lowlevel;
bool isItemUsable = false;