mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Core/Spells): Glyph of Scourge Strike can prolong diseases that were reapplied (#22438)
This commit is contained in:
@@ -5910,9 +5910,17 @@ uint32 Unit::GetDiseasesByCaster(ObjectGuid casterGUID, uint8 mode)
|
||||
else if (mode == 2)
|
||||
{
|
||||
Aura* aura = (*i)->GetBase();
|
||||
if (aura && !aura->IsRemoved() && aura->GetDuration() > 0)
|
||||
if ((aura->GetApplyTime() + aura->GetMaxDuration() / 1000 + 8) > (GameTime::GetGameTime().count() + aura->GetDuration() / 1000))
|
||||
aura->SetDuration(aura->GetDuration() + 3000);
|
||||
uint32 countMin = aura->GetMaxDuration();
|
||||
uint32 countMax = aura->GetSpellInfo()->GetMaxDuration() + 9000;
|
||||
|
||||
if (AuraEffect const* epidemic = (*i)->GetCaster()->GetAuraEffectOfRankedSpell(49036, EFFECT_0))
|
||||
countMax += epidemic->GetAmount();
|
||||
|
||||
if (countMin < countMax)
|
||||
{
|
||||
aura->SetDuration(uint32(aura->GetDuration() + 3000));
|
||||
aura->SetMaxDuration(countMin + 3000);
|
||||
}
|
||||
}
|
||||
}
|
||||
++i;
|
||||
|
||||
Reference in New Issue
Block a user