Core/Items: Implemented many new enchantment flags

This commit is contained in:
Shauren
2022-01-09 16:31:12 +01:00
parent 6df3cb0995
commit 241193cd02
10 changed files with 56 additions and 68 deletions

View File

@@ -7087,7 +7087,7 @@ SpellCastResult Spell::CheckItems(int32* param1 /*= nullptr*/, int32* 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;
@@ -7101,10 +7101,10 @@ SpellCastResult Spell::CheckItems(int32* param1 /*= nullptr*/, int32* param2 /*=
if (item->GetOwner() != player)
{
uint32 enchant_id = spellEffectInfo.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;
}