mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-29 21:32:52 +01:00
Core/Spell: do positivity spell checks only against actually hitted effects instead of the whole spell
Closes #18097
This commit is contained in:
@@ -2352,7 +2352,19 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
|
||||
if (m_damage > 0)
|
||||
positive = false;
|
||||
else if (!m_healing)
|
||||
positive = m_spellInfo->IsPositive();
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
if (!(target->effectMask & (1 << i)))
|
||||
continue;
|
||||
|
||||
if (!m_spellInfo->IsPositiveEffect(i))
|
||||
{
|
||||
positive = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch (m_spellInfo->DmgClass)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user