mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
refactor(Core/Item): Add helpers (#19828)
This commit is contained in:
@@ -2835,7 +2835,7 @@ void Spell::EffectEnchantItemPerm(SpellEffIndex effIndex)
|
||||
else
|
||||
{
|
||||
// do not increase skill if vellum used
|
||||
if (!(m_CastItem && m_CastItem->GetTemplate()->Flags & ITEM_FLAG_NO_REAGENT_COST))
|
||||
if (!(m_CastItem && m_CastItem->GetTemplate()->HasFlag(ITEM_FLAG_NO_REAGENT_COST)))
|
||||
p_caster->UpdateCraftSkill(m_spellInfo->Id);
|
||||
|
||||
uint32 enchant_id = m_spellInfo->Effects[effIndex].MiscValue;
|
||||
@@ -5476,7 +5476,7 @@ void Spell::EffectProspecting(SpellEffIndex /*effIndex*/)
|
||||
return;
|
||||
|
||||
Player* p_caster = m_caster->ToPlayer();
|
||||
if (!itemTarget || !(itemTarget->GetTemplate()->Flags & ITEM_FLAG_IS_PROSPECTABLE))
|
||||
if (!itemTarget || !itemTarget->GetTemplate()->HasFlag(ITEM_FLAG_IS_PROSPECTABLE))
|
||||
return;
|
||||
|
||||
if (itemTarget->GetCount() < 5)
|
||||
@@ -5501,7 +5501,7 @@ void Spell::EffectMilling(SpellEffIndex /*effIndex*/)
|
||||
return;
|
||||
|
||||
Player* p_caster = m_caster->ToPlayer();
|
||||
if (!itemTarget || !(itemTarget->GetTemplate()->Flags & ITEM_FLAG_IS_MILLABLE))
|
||||
if (!itemTarget || !itemTarget->GetTemplate()->HasFlag(ITEM_FLAG_IS_MILLABLE))
|
||||
return;
|
||||
|
||||
if (itemTarget->GetCount() < 5)
|
||||
|
||||
Reference in New Issue
Block a user