Core/Spells: Fix Glyph of Scourge Strike

Closes #391
This commit is contained in:
tobmaps
2011-07-21 20:38:13 +07:00
parent dae2a088fd
commit dd2990e2a7
4 changed files with 44 additions and 4 deletions
+6
View File
@@ -5509,6 +5509,12 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
victim->RemoveAurasWithMechanic(1<<MECHANIC_STUN, AURA_REMOVE_BY_ENEMY_SPELL);
return true;
}
// Glyph of Scourge Strike
case 58642:
{
triggered_spell_id = 69961; // Glyph of Scourge Strike
break;
}
// Glyph of Life Tap
case 63320:
{
+34 -3
View File
@@ -4337,21 +4337,52 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
// Glyph of Backstab
case 63975:
{
// search our Rupture aura on target
if (AuraEffect const* aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x00100000, 0, 0, m_caster->GetGUID()))
{
uint32 countMin = aurEff->GetBase()->GetMaxDuration();
uint32 countMax = 12000;
uint32 countMax = 12000; // this can be wrong, duration should be based on combo-points
countMax += m_caster->HasAura(56801) ? 4000 : 0;
if (countMin < countMax)
{
aurEff->GetBase()->SetDuration(uint32(aurEff->GetBase()->GetDuration()+3000));
aurEff->GetBase()->SetMaxDuration(countMin+2000);
aurEff->GetBase()->SetDuration(uint32(aurEff->GetBase()->GetDuration() + 3000));
aurEff->GetBase()->SetMaxDuration(countMin + 2000);
}
}
return;
}
// Glyph of Scourge Strike
case 69961:
{
Unit::AuraEffectList const &mPeriodic = unitTarget->GetAuraEffectsByType(SPELL_AURA_PERIODIC_DAMAGE);
for (Unit::AuraEffectList::const_iterator i = mPeriodic.begin(); i != mPeriodic.end(); ++i)
{
AuraEffect const* aurEff = *i;
SpellEntry const* spellInfo = aurEff->GetSpellProto();
// search our Blood Plague and Frost Fever on target
if (spellInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && spellInfo->SpellFamilyFlags[2] & 0x2 &&
aurEff->GetCasterGUID() == m_caster->GetGUID())
{
uint32 countMin = aurEff->GetBase()->GetMaxDuration();
uint32 countMax = GetSpellMaxDuration(spellInfo);
// this Glyph
countMax += 9000;
// talent Epidemic
if (AuraEffect const* epidemic = m_caster->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_DEATHKNIGHT, 234, EFFECT_0))
countMax += epidemic->GetAmount();
if (countMin < countMax)
{
aurEff->GetBase()->SetDuration(aurEff->GetBase()->GetDuration() + 3000);
aurEff->GetBase()->SetMaxDuration(countMin + 3000);
}
}
}
return;
}
case 45204: // Clone Me!
m_caster->CastSpell(unitTarget, damage, true);
break;