mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
*Fix a bug in 307. Only the trigger effect should be applied but not the whole spell.
*Restore build in Linux. *Change "Added aura" log to level: detail. --HG-- branch : trunk
This commit is contained in:
@@ -712,17 +712,11 @@ void Spell::AddUnitTarget(Unit* pVictim, uint32 effIndex)
|
||||
target.processed = false; // Effects not apply on target
|
||||
|
||||
// Calculate hit result
|
||||
if(m_spellInfo->Effect[effIndex] == SPELL_EFFECT_DUMMY)
|
||||
target.missCondition = SPELL_MISS_NONE;
|
||||
else if(m_originalCaster)
|
||||
if(m_originalCaster)
|
||||
target.missCondition = m_originalCaster->SpellHitResult(pVictim, m_spellInfo, m_canReflect);
|
||||
else
|
||||
target.missCondition = SPELL_MISS_EVADE; //SPELL_MISS_NONE;
|
||||
|
||||
if(target.missCondition == SPELL_MISS_IMMUNE // Mass Dispel
|
||||
&& m_spellInfo->Effect[effIndex] == SPELL_EFFECT_TRIGGER_SPELL)
|
||||
target.missCondition = SPELL_MISS_NONE;
|
||||
|
||||
if (target.missCondition == SPELL_MISS_NONE)
|
||||
++m_countOfHit;
|
||||
else
|
||||
@@ -947,6 +941,16 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
||||
if (target->reflectResult == SPELL_MISS_NONE) // If reflected spell hit caster -> do all effect on him
|
||||
DoSpellHitOnUnit(m_caster, mask);
|
||||
}
|
||||
else //TODO: This is a hack. need fix
|
||||
{
|
||||
uint32 tempMask = 0;
|
||||
for(uint32 i = 0; i < 3; ++i)
|
||||
if(m_spellInfo->Effect[i] == SPELL_EFFECT_DUMMY
|
||||
|| m_spellInfo->Effect[i] == SPELL_EFFECT_TRIGGER_SPELL)
|
||||
tempMask |= 1<<i;
|
||||
if(tempMask &= mask)
|
||||
DoSpellHitOnUnit(unit, tempMask);
|
||||
}
|
||||
|
||||
// Do triggers only on miss/resist/parry/dodge
|
||||
if (missInfo!=SPELL_MISS_NONE)
|
||||
|
||||
Reference in New Issue
Block a user