Core/Items: ported several enchantment flag implementations from master branch

This commit is contained in:
Ovahlord committed 2022-01-09 18:15:38 +01:00
1 parent 009e1dba37
commit 3ff8840fe2
8 files changed
+35 -63

No files matched your search

+4 -4
View File
@@ -7124,7 +7124,7 @@ SpellCastResult Spell::CheckItems(uint32* param1 /*= nullptr*/, uint32* param2 /
{
if (!enchantEntry)
return SPELL_FAILED_ERROR;
if (enchantEntry->Flags & ENCHANTMENT_CAN_SOULBOUND)
if (enchantEntry->GetFlags().HasFlag(SpellItemEnchantmentFlags::Soulbound))
return SPELL_FAILED_NOT_TRADEABLE;
}
break;
@@ -7138,10 +7138,10 @@ SpellCastResult Spell::CheckItems(uint32* param1 /*= nullptr*/, uint32* param2 /
if (item->GetOwner() != m_caster)
{
uint32 enchant_id = m_spellInfo->Effects[i].MiscValue;
SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id);
if (!pEnchant)
SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(enchant_id);
if (!enchantEntry)
return SPELL_FAILED_ERROR;
if (pEnchant->Flags & ENCHANTMENT_CAN_SOULBOUND)
if (enchantEntry->GetFlags().HasFlag(SpellItemEnchantmentFlags::Soulbound))
return SPELL_FAILED_NOT_TRADEABLE;
}