mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spell: consider spells with no targets for the purpose of finish procs
Closes #18799
(cherry-picked from c3474f57bc)
This commit is contained in:
@@ -2042,7 +2042,6 @@ void Spell::prepareDataForTriggerSystem()
|
||||
// For other spells trigger procflags are set in Spell::DoAllEffectOnTarget
|
||||
// Because spell positivity is dependant on target
|
||||
}
|
||||
m_hitMask = PROC_HIT_NONE;
|
||||
|
||||
// Hunter trap spells - activation proc for Lock and Load, Entrapment and Misdirection
|
||||
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER &&
|
||||
@@ -3452,8 +3451,14 @@ void Spell::handle_immediate()
|
||||
// process immediate effects (items, ground, etc.) also initialize some variables
|
||||
_handle_immediate_phase();
|
||||
|
||||
for (std::vector<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
DoAllEffectOnTarget(&(*ihit));
|
||||
// consider spell hit for some spells without target, so they may proc on finish phase correctly
|
||||
if (m_UniqueTargetInfo.empty())
|
||||
m_hitMask = PROC_HIT_NORMAL;
|
||||
else
|
||||
{
|
||||
for (std::vector<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
DoAllEffectOnTarget(&(*ihit));
|
||||
}
|
||||
|
||||
for (std::vector<GOTargetInfo>::iterator ihit = m_UniqueGOTargetInfo.begin(); ihit != m_UniqueGOTargetInfo.end(); ++ihit)
|
||||
DoAllEffectOnTarget(&(*ihit));
|
||||
|
||||
Reference in New Issue
Block a user