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
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue