mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +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
|
|
@ -216,8 +216,9 @@ class MANGOS_DLL_SPEC Aura
|
||||||
|
|
||||||
void SetModifier(AuraType t, int32 a, uint32 pt, int32 miscValue);
|
void SetModifier(AuraType t, int32 a, uint32 pt, int32 miscValue);
|
||||||
Modifier* GetModifier() { return &m_modifier; }
|
Modifier* GetModifier() { return &m_modifier; }
|
||||||
int32 GetMiscValue() {return m_spellProto->EffectMiscValue[m_effIndex];}
|
Modifier const* GetModifier() const { return &m_modifier; }
|
||||||
int32 GetMiscBValue() {return m_spellProto->EffectMiscValueB[m_effIndex];}
|
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; }
|
SpellEntry const* GetSpellProto() const { return m_spellProto; }
|
||||||
uint32 GetId() const{ return m_spellProto->Id; }
|
uint32 GetId() const{ return m_spellProto->Id; }
|
||||||
|
|
|
||||||
|
|
@ -437,27 +437,40 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
|
||||||
// Conflagrate - consumes Immolate or Shadowflame
|
// Conflagrate - consumes Immolate or Shadowflame
|
||||||
else if (m_spellInfo->TargetAuraState == AURA_STATE_CONFLAGRATE)
|
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);
|
Unit::AuraList const &mPeriodic = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
|
||||||
for(Unit::AuraList::const_iterator i = mPeriodic.begin(); i != mPeriodic.end(); ++i)
|
for(Unit::AuraList::const_iterator i = mPeriodic.begin(); i != mPeriodic.end(); ++i)
|
||||||
{
|
{
|
||||||
if ((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK &&
|
// for caster applied auras only
|
||||||
(*i)->GetCasterGUID()==m_caster->GetGUID() &&
|
if ((*i)->GetSpellProto()->SpellFamilyName != SPELLFAMILY_WARLOCK ||
|
||||||
|
(*i)->GetCasterGUID()!=m_caster->GetGUID())
|
||||||
|
continue;
|
||||||
|
|
||||||
// Immolate
|
// Immolate
|
||||||
((*i)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000000004) ||
|
if ((*i)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000000004))
|
||||||
// Shadowflame
|
|
||||||
(*i)->GetSpellProto()->SpellFamilyFlags2 & 0x00000002))
|
|
||||||
{
|
{
|
||||||
int32 damagetick = m_caster->SpellDamageBonus(unitTarget, (*i)->GetSpellProto(), (*i)->GetModifier()->m_amount, DOT);
|
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;
|
damage += damagetick * 4;
|
||||||
|
|
||||||
// Glyph of Conflagrate
|
// Glyph of Conflagrate
|
||||||
if (!m_caster->HasAura(56235))
|
if (!m_caster->HasAura(56235))
|
||||||
unitTarget->RemoveAurasByCasterSpell((*i)->GetId(), m_caster->GetGUID());
|
unitTarget->RemoveAurasByCasterSpell(aura->GetId(), m_caster->GetGUID());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SPELLFAMILY_PRIEST:
|
case SPELLFAMILY_PRIEST:
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8216"
|
#define REVISION_NR "8217"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue