mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
*Fix a typo causing problems with triggered spell procing.
*More correct damage calculation for conflagrate - by tlexii --HG-- branch : trunk
This commit is contained in:
@@ -825,7 +825,7 @@ void Spell::prepareDataForTriggerSystem(AuraEffect * triggeredByAura)
|
||||
Effects which are result of aura proc from triggered spell cannot proc
|
||||
to prevent chain proc of these spells
|
||||
*/
|
||||
if ((triggeredByAura && !triggeredByAura->GetParentAura()->GetTarget()->CanProc()) || !m_caster->CanProc())
|
||||
if ((triggeredByAura && !triggeredByAura->GetParentAura()->GetTarget()->CanProc()))
|
||||
{
|
||||
m_canTrigger=false;
|
||||
}
|
||||
@@ -833,6 +833,8 @@ void Spell::prepareDataForTriggerSystem(AuraEffect * triggeredByAura)
|
||||
if (m_IsTriggeredSpell &&
|
||||
(m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_TRIGGERED_CAN_TRIGGER ||
|
||||
m_spellInfo->AttributesEx3 & SPELL_ATTR_EX3_TRIGGERED_CAN_TRIGGER_2))
|
||||
m_procEx |= PROC_EX_INTERNAL_CANT_PROC;
|
||||
else if (m_IsTriggeredSpell)
|
||||
m_procEx |= PROC_EX_INTERNAL_TRIGGERED;
|
||||
|
||||
// Totem casts require spellfamilymask defined in spell_proc_event to proc
|
||||
@@ -850,8 +852,6 @@ void Spell::prepareDataForTriggerSystem(AuraEffect * triggeredByAura)
|
||||
m_canTrigger=false;
|
||||
}
|
||||
}
|
||||
if (m_IsTriggeredSpell || triggeredByAura)
|
||||
m_procEx |= PROC_EX_INTERNAL_CANT_PROC;
|
||||
}
|
||||
|
||||
void Spell::CleanupTargetList()
|
||||
@@ -1401,7 +1401,7 @@ void Spell::DoTriggersOnSpellHit(Unit *unit)
|
||||
if(roll_chance_i(i->second))
|
||||
{
|
||||
m_caster->CastSpell(unit, i->first, true);
|
||||
sLog.outDebug("Spell %d triggered spell %d by SPELL_AURA_ADD_TARGET_TRIGGER aura", m_spellInfo->Id, i->first);
|
||||
sLog.outDebug("Spell %d triggered spell %d by SPELL_AURA_ADD_TARGET_TRIGGER aura", m_spellInfo->Id, i->first->Id);
|
||||
}
|
||||
if (GetSpellDuration(i->first)==-1)
|
||||
{
|
||||
|
||||
@@ -315,6 +315,8 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
|
||||
|
||||
void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
|
||||
{
|
||||
bool apply_direct_bonus=true;
|
||||
|
||||
if( unitTarget && unitTarget->isAlive())
|
||||
{
|
||||
switch(m_spellInfo->SpellFamilyName)
|
||||
@@ -486,6 +488,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
|
||||
uint32 pdamage = (*i)->GetAmount() > 0 ? (*i)->GetAmount() : 0;
|
||||
pdamage = m_caster->SpellDamageBonus(unitTarget, (*i)->GetSpellProto(), pdamage, DOT, (*i)->GetParentAura()->GetStackAmount());
|
||||
damage += pdamage * 4; // 4 ticks of 3 seconds = 12 secs
|
||||
apply_direct_bonus = false;
|
||||
// Glyph of Conflagrate
|
||||
if (!m_caster->HasAura(56235))
|
||||
unitTarget->RemoveAurasDueToSpell((*i)->GetId(), m_caster->GetGUID());
|
||||
@@ -679,7 +682,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
|
||||
}
|
||||
}
|
||||
|
||||
if(m_originalCaster && damage > 0)
|
||||
if(m_originalCaster && damage > 0 && apply_direct_bonus)
|
||||
damage = m_originalCaster->SpellDamageBonus(unitTarget, m_spellInfo, (uint32)damage, SPELL_DIRECT_DAMAGE);
|
||||
|
||||
m_damage += damage;
|
||||
|
||||
Reference in New Issue
Block a user