mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
Fix Glyph of Shred.
--HG-- branch : trunk
This commit is contained in:
@@ -4937,25 +4937,6 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
||||
}
|
||||
return;
|
||||
}
|
||||
// Glyph of Shred
|
||||
case 63974:
|
||||
{
|
||||
if (AuraEffect const * aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE,SPELLFAMILY_DRUID,0x00800000,0,0,m_caster->GetGUID()))
|
||||
{
|
||||
uint32 countMin = aurEff->GetBase()->GetMaxDuration();
|
||||
uint32 countMax = 20000;
|
||||
countMax += m_caster->HasAura(54818) ? 4000 : 0;
|
||||
countMax += m_caster->HasAura(60141) ? 4000 : 0;
|
||||
|
||||
if (countMin < countMax)
|
||||
{
|
||||
aurEff->GetBase()->SetDuration(uint32(aurEff->GetBase()->GetDuration()+3000));
|
||||
aurEff->GetBase()->SetMaxDuration(countMin+2000);
|
||||
}
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
// Glyph of Backstab
|
||||
case 63975:
|
||||
{
|
||||
|
||||
@@ -6222,8 +6222,31 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
||||
// Glyph of Shred
|
||||
case 54815:
|
||||
{
|
||||
triggered_spell_id = 63974;
|
||||
break;
|
||||
// try to find spell Rip on the target
|
||||
if (AuraEffect const *AurEff = target->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, 0x00800000, 0x0, 0x0, GetGUID()))
|
||||
{
|
||||
// Rip's max duration, note: spells which modifies Rip's duration also counted like Glyph of Rip
|
||||
uint32 CountMin = AurEff->GetBase()->GetMaxDuration();
|
||||
|
||||
// just Rip's max duration without other spells
|
||||
uint32 CountMax = GetSpellMaxDuration(AurEff->GetSpellProto());
|
||||
|
||||
// add possible auras' and Glyph of Shred's max duration
|
||||
CountMax += 3 * triggerAmount * 1000; // Glyph of Shred -> +6 seconds
|
||||
CountMax += HasAura(54818) ? 4 * 1000 : 0; // Glyph of Rip -> +4 seconds
|
||||
CountMax += HasAura(60141) ? 4 * 1000 : 0; // Rip Duration/Lacerate Damage -> +4 seconds
|
||||
|
||||
// if min < max -> that means caster didn't cast 3 shred yet
|
||||
// so set Rip's duration and max duration
|
||||
if (CountMin < CountMax)
|
||||
{
|
||||
AurEff->GetBase()->SetDuration(AurEff->GetBase()->GetDuration() + triggerAmount * 1000);
|
||||
AurEff->GetBase()->SetMaxDuration(CountMin + triggerAmount * 1000);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// if not found Rip
|
||||
return false;
|
||||
}
|
||||
// Glyph of Rake
|
||||
case 54821:
|
||||
|
||||
Reference in New Issue
Block a user