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:
parent
891d7bd47c
commit
dbc39a2817
3 changed files with 9 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
if (entry && (entry->attributeMask & ENCHANT_PROC_ATTR_WHITE_HIT) && (procVictim & SPELL_PROC_FLAG_MASK))
|
||||
continue;
|
||||
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pEnchant->spellid[s]);
|
||||
if (!spellInfo)
|
||||
{
|
||||
|
|
@ -7272,10 +7275,8 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32
|
|||
item->SetEnchantmentCharges(EnchantmentSlot(e_slot), charges);
|
||||
}
|
||||
|
||||
if (spellInfo->IsPositive())
|
||||
CastSpell(this, 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);
|
||||
Unit* unitTarget = spellInfo->IsPositive() ? this : target;
|
||||
CastSpell(unitTarget, 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
|
||||
{
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue