mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[8217] Implement proper priority in effect selection at talent 17962 cast.
This commit is contained in:
parent
680ab810e0
commit
d2dadbcb99
3 changed files with 31 additions and 17 deletions
|
|
@ -215,9 +215,10 @@ class MANGOS_DLL_SPEC Aura
|
|||
virtual ~Aura();
|
||||
|
||||
void SetModifier(AuraType t, int32 a, uint32 pt, int32 miscValue);
|
||||
Modifier* GetModifier() {return &m_modifier;}
|
||||
int32 GetMiscValue() {return m_spellProto->EffectMiscValue[m_effIndex];}
|
||||
int32 GetMiscBValue() {return m_spellProto->EffectMiscValueB[m_effIndex];}
|
||||
Modifier* GetModifier() { return &m_modifier; }
|
||||
Modifier const* GetModifier() const { return &m_modifier; }
|
||||
int32 GetMiscValue() const { return m_spellProto->EffectMiscValue[m_effIndex]; }
|
||||
int32 GetMiscBValue() const { return m_spellProto->EffectMiscValueB[m_effIndex]; }
|
||||
|
||||
SpellEntry const* GetSpellProto() const { return m_spellProto; }
|
||||
uint32 GetId() const{ return m_spellProto->Id; }
|
||||
|
|
|
|||
|
|
@ -437,25 +437,38 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
|
|||
// Conflagrate - consumes Immolate or Shadowflame
|
||||
else if (m_spellInfo->TargetAuraState == AURA_STATE_CONFLAGRATE)
|
||||
{
|
||||
// for caster applied auras only
|
||||
Aura const* aura = NULL; // found req. aura for damage calculation
|
||||
|
||||
Unit::AuraList const &mPeriodic = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
|
||||
for(Unit::AuraList::const_iterator i = mPeriodic.begin(); i != mPeriodic.end(); ++i)
|
||||
{
|
||||
if ((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK &&
|
||||
(*i)->GetCasterGUID()==m_caster->GetGUID() &&
|
||||
// Immolate
|
||||
((*i)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000000004) ||
|
||||
// Shadowflame
|
||||
(*i)->GetSpellProto()->SpellFamilyFlags2 & 0x00000002))
|
||||
{
|
||||
int32 damagetick = m_caster->SpellDamageBonus(unitTarget, (*i)->GetSpellProto(), (*i)->GetModifier()->m_amount, DOT);
|
||||
damage += damagetick * 4;
|
||||
// for caster applied auras only
|
||||
if ((*i)->GetSpellProto()->SpellFamilyName != SPELLFAMILY_WARLOCK ||
|
||||
(*i)->GetCasterGUID()!=m_caster->GetGUID())
|
||||
continue;
|
||||
|
||||
// Glyph of Conflagrate
|
||||
if (!m_caster->HasAura(56235))
|
||||
unitTarget->RemoveAurasByCasterSpell((*i)->GetId(), m_caster->GetGUID());
|
||||
// Immolate
|
||||
if ((*i)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000000004))
|
||||
{
|
||||
aura = *i; // it selected always if exist
|
||||
break;
|
||||
}
|
||||
|
||||
// Shadowflame
|
||||
if ((*i)->GetSpellProto()->SpellFamilyFlags2 & 0x00000002)
|
||||
aura = *i; // remember but wait possible Immolate as primary priority
|
||||
}
|
||||
|
||||
// found Immolate or Shadowflame
|
||||
if (aura)
|
||||
{
|
||||
int32 damagetick = m_caster->SpellDamageBonus(unitTarget, aura->GetSpellProto(), aura->GetModifier()->m_amount, DOT);
|
||||
damage += damagetick * 4;
|
||||
|
||||
// Glyph of Conflagrate
|
||||
if (!m_caster->HasAura(56235))
|
||||
unitTarget->RemoveAurasByCasterSpell(aura->GetId(), m_caster->GetGUID());
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8216"
|
||||
#define REVISION_NR "8217"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue