fix(Core/Spells): Implemented ENCHANT_PROC_ATTR_EXCLUSIVE. (#15476)

Fixes #12132
This commit is contained in:
UltraNix
2023-04-02 20:28:23 +02:00
committed by GitHub
parent d029ffe3ab
commit a72f5f97e6
4 changed files with 21 additions and 2 deletions

View File

@@ -7218,6 +7218,15 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32
continue;
}
if (entry && (entry->attributeMask & ENCHANT_PROC_ATTR_EXCLUSIVE) != 0)
{
Unit* checkTarget = spellInfo->IsPositive() ? this : target;
if (checkTarget->HasAura(spellInfo->Id, GetGUID()))
{
continue;
}
}
float chance = pEnchant->amount[s] != 0 ? float(pEnchant->amount[s]) : GetWeaponProcChance();
if (entry)