mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
Revert "fix(Core/Spells): Ignite and Revitalize should not prelong co… (#14513)
Revert "fix(Core/Spells): Ignite and Revitalize should not prelong combat. (#13812)"
This reverts commit 96fa9c5c7b.
This commit is contained in:
@@ -7317,7 +7317,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
if (!blessHealing || !victim)
|
||||
return false;
|
||||
basepoints0 = int32(CalculatePct(damage, triggerAmount) / (blessHealing->GetMaxDuration() / blessHealing->Effects[0].Amplitude));
|
||||
victim->CastDelayedSpellWithPeriodicAmount(this, triggered_spell_id, SPELL_AURA_PERIODIC_HEAL, basepoints0, triggeredByAura);
|
||||
victim->CastDelayedSpellWithPeriodicAmount(this, triggered_spell_id, SPELL_AURA_PERIODIC_HEAL, basepoints0);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
@@ -7707,7 +7707,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
basepoints0 = triggerAmount * damage / 400;
|
||||
triggered_spell_id = 61840;
|
||||
// Add remaining ticks to damage done
|
||||
victim->CastDelayedSpellWithPeriodicAmount(this, triggered_spell_id, SPELL_AURA_PERIODIC_DAMAGE, basepoints0, triggeredByAura);
|
||||
victim->CastDelayedSpellWithPeriodicAmount(this, triggered_spell_id, SPELL_AURA_PERIODIC_DAMAGE, basepoints0);
|
||||
return true;
|
||||
}
|
||||
// Sheath of Light
|
||||
@@ -8385,7 +8385,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
AddPct(basepoints0, glyph->GetAmount());
|
||||
|
||||
basepoints0 = basepoints0 / (unholyBlight->GetMaxDuration() / unholyBlight->Effects[0].Amplitude);
|
||||
victim->CastDelayedSpellWithPeriodicAmount(this, triggered_spell_id, SPELL_AURA_PERIODIC_DAMAGE, basepoints0, triggeredByAura);
|
||||
victim->CastDelayedSpellWithPeriodicAmount(this, triggered_spell_id, SPELL_AURA_PERIODIC_DAMAGE, basepoints0);
|
||||
return true;
|
||||
}
|
||||
// Vendetta
|
||||
@@ -9053,7 +9053,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
||||
basepoints0 = CalculatePct(int32(damage), triggerAmount) / 3;
|
||||
target = this;
|
||||
// Add remaining ticks to healing done
|
||||
CastDelayedSpellWithPeriodicAmount(this, trigger_spell_id, SPELL_AURA_PERIODIC_HEAL, basepoints0, triggeredByAura);
|
||||
CastDelayedSpellWithPeriodicAmount(this, trigger_spell_id, SPELL_AURA_PERIODIC_HEAL, basepoints0);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
@@ -9133,7 +9133,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
||||
return false;
|
||||
|
||||
basepoints0 = CalculatePct(int32(damage), triggerAmount) / (TriggerPS->GetMaxDuration() / TriggerPS->Effects[0].Amplitude);
|
||||
victim->CastDelayedSpellWithPeriodicAmount(this, trigger_spell_id, SPELL_AURA_PERIODIC_DAMAGE, basepoints0, triggeredByAura);
|
||||
victim->CastDelayedSpellWithPeriodicAmount(this, trigger_spell_id, SPELL_AURA_PERIODIC_DAMAGE, basepoints0);
|
||||
return true;
|
||||
}
|
||||
// Item - Hunter T9 4P Bonus (Steady Shot)
|
||||
@@ -20335,17 +20335,13 @@ void Unit::OutDebugInfo() const
|
||||
class AuraMunchingQueue : public BasicEvent
|
||||
{
|
||||
public:
|
||||
AuraMunchingQueue(Unit& owner, ObjectGuid targetGUID, int32 basePoints, uint32 spellId, AuraEffect const* aurEff) :
|
||||
_owner(owner), _targetGUID(targetGUID), _basePoints(basePoints), _spellId(spellId)
|
||||
{
|
||||
_aurEff = aurEff->GetBase()->GetDuration() > 400 ? aurEff : nullptr;
|
||||
}
|
||||
AuraMunchingQueue(Unit& owner, ObjectGuid targetGUID, int32 basePoints, uint32 spellId) : _owner(owner), _targetGUID(targetGUID), _basePoints(basePoints), _spellId(spellId) { }
|
||||
|
||||
bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/) override
|
||||
{
|
||||
if (_owner.IsInWorld() && _owner.FindMap())
|
||||
if (Unit* target = ObjectAccessor::GetUnit(_owner, _targetGUID))
|
||||
_owner.CastCustomSpell(_spellId, SPELLVALUE_BASE_POINT0, _basePoints, target, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_NO_PERIODIC_RESET), nullptr, _aurEff, _owner.GetGUID());
|
||||
_owner.CastCustomSpell(_spellId, SPELLVALUE_BASE_POINT0, _basePoints, target, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_NO_PERIODIC_RESET), nullptr, nullptr, _owner.GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -20355,10 +20351,9 @@ private:
|
||||
ObjectGuid _targetGUID;
|
||||
int32 _basePoints;
|
||||
uint32 _spellId;
|
||||
AuraEffect const* _aurEff;
|
||||
};
|
||||
|
||||
void Unit::CastDelayedSpellWithPeriodicAmount(Unit* caster, uint32 spellId, AuraType auraType, int32 addAmount, AuraEffect const* aurEff, uint8 effectIndex)
|
||||
void Unit::CastDelayedSpellWithPeriodicAmount(Unit* caster, uint32 spellId, AuraType auraType, int32 addAmount, uint8 effectIndex)
|
||||
{
|
||||
for (AuraEffectList::iterator i = m_modAuras[auraType].begin(); i != m_modAuras[auraType].end(); ++i)
|
||||
{
|
||||
@@ -20372,9 +20367,9 @@ void Unit::CastDelayedSpellWithPeriodicAmount(Unit* caster, uint32 spellId, Aura
|
||||
|
||||
// xinef: delay only for casting on different unit
|
||||
if (this == caster)
|
||||
caster->CastCustomSpell(spellId, SPELLVALUE_BASE_POINT0, addAmount, this, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_NO_PERIODIC_RESET), nullptr, aurEff, caster->GetGUID());
|
||||
caster->CastCustomSpell(spellId, SPELLVALUE_BASE_POINT0, addAmount, this, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_NO_PERIODIC_RESET), nullptr, nullptr, caster->GetGUID());
|
||||
else
|
||||
caster->m_Events.AddEvent(new AuraMunchingQueue(*caster, GetGUID(), addAmount, spellId, aurEff), caster->m_Events.CalculateQueueTime(400));
|
||||
caster->m_Events.AddEvent(new AuraMunchingQueue(*caster, GetGUID(), addAmount, spellId), caster->m_Events.CalculateQueueTime(400));
|
||||
}
|
||||
|
||||
void Unit::SendClearTarget()
|
||||
|
||||
Reference in New Issue
Block a user