mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-02 10:33:46 +00:00
fix(Core/Spells): Implement ENCHANT_PROC_ATTR_WHITE_HIT (#16771)
Co-authored-by: Ariel Silva<ariel-@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
--
|
||||||
|
UPDATE `spell_enchant_proc_data` SET `attributeMask` = 0x2 WHERE `entry` = 2675;
|
||||||
@@ -7224,6 +7224,9 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (entry && (entry->attributeMask & ENCHANT_PROC_ATTR_WHITE_HIT) && (procVictim & SPELL_PROC_FLAG_MASK))
|
||||||
|
continue;
|
||||||
|
|
||||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pEnchant->spellid[s]);
|
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pEnchant->spellid[s]);
|
||||||
if (!spellInfo)
|
if (!spellInfo)
|
||||||
{
|
{
|
||||||
@@ -7272,10 +7275,8 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32
|
|||||||
item->SetEnchantmentCharges(EnchantmentSlot(e_slot), charges);
|
item->SetEnchantmentCharges(EnchantmentSlot(e_slot), charges);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spellInfo->IsPositive())
|
Unit* unitTarget = spellInfo->IsPositive() ? this : target;
|
||||||
CastSpell(this, spellInfo, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD), item);
|
CastSpell(unitTarget, spellInfo, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD), item);
|
||||||
else
|
|
||||||
CastSpell(target, spellInfo, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD), item);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -306,7 +306,8 @@ typedef std::unordered_map<uint32, SpellProcEntry> SpellProcMap;
|
|||||||
|
|
||||||
enum EnchantProcAttributes
|
enum EnchantProcAttributes
|
||||||
{
|
{
|
||||||
ENCHANT_PROC_ATTR_EXCLUSIVE = 0x1 // Only one instance of that effect can be active
|
ENCHANT_PROC_ATTR_EXCLUSIVE = 0x1, // Only one instance of that effect can be active
|
||||||
|
ENCHANT_PROC_ATTR_WHITE_HIT = 0x2 // Enchant shall only proc off white hits (not abilities)
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SpellEnchantProcEntry
|
struct SpellEnchantProcEntry
|
||||||
|
|||||||
Reference in New Issue
Block a user