mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-07 04:47:45 +00:00
fix(Core/Unit): Remove delay for Conflagrate aura state (#18068)
Removes ConflagrateAuraStateDelayEvent
Cherry-picked from: e27c385b48
Co-authored-by: Ariel Silva <ariel-@users.noreply.github.com>
This commit is contained in:
@@ -4468,19 +4468,12 @@ void Unit::_ApplyAura(AuraApplication* aurApp, uint8 effMask)
|
|||||||
SpellInfo const* spellInfo = aura->GetSpellInfo();
|
SpellInfo const* spellInfo = aura->GetSpellInfo();
|
||||||
if (AuraStateType aState = spellInfo->GetAuraState())
|
if (AuraStateType aState = spellInfo->GetAuraState())
|
||||||
{
|
{
|
||||||
if (aState != AURA_STATE_CONFLAGRATE)
|
uint32 aStateMask = (1 << (aState - 1));
|
||||||
{
|
// force update so the new caster registers it
|
||||||
// Sting (hunter's pet ability), Faerie Fire (druid versions)
|
if ((aStateMask & PER_CASTER_AURA_STATE_MASK) && HasFlag(UNIT_FIELD_AURASTATE, aStateMask))
|
||||||
if (aState == AURA_STATE_FAERIE_FIRE)
|
ForceValuesUpdateAtIndex(UNIT_FIELD_AURASTATE);
|
||||||
aurApp->GetTarget()->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
|
else
|
||||||
|
|
||||||
ModifyAuraState(aState, true);
|
ModifyAuraState(aState, true);
|
||||||
}
|
|
||||||
else if (caster)
|
|
||||||
{
|
|
||||||
ConflagrateAuraStateDelayEvent* pEvent = new ConflagrateAuraStateDelayEvent(this, caster->GetGUID());
|
|
||||||
m_Events.AddEvent(pEvent, m_Events.CalculateTime(700)); // intended 700ms delay before allowing to cast conflagrate
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aurApp->GetRemoveMode())
|
if (aurApp->GetRemoveMode())
|
||||||
@@ -4575,9 +4568,19 @@ void Unit::_UnapplyAura(AuraApplicationMap::iterator& i, AuraRemoveMode removeMo
|
|||||||
ToTotem()->setDeathState(DeathState::JustDied);
|
ToTotem()->setDeathState(DeathState::JustDied);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove aurastates only if were not found
|
// Remove aurastates only if needed and were not found
|
||||||
if (!auraStateFound)
|
if (auraState)
|
||||||
ModifyAuraState(auraState, false);
|
{
|
||||||
|
if (!auraStateFound)
|
||||||
|
ModifyAuraState(auraState, false);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// update for casters, some shouldn't 'see' the aura state
|
||||||
|
uint32 aStateMask = (1 << (auraState - 1));
|
||||||
|
if ((aStateMask & PER_CASTER_AURA_STATE_MASK) != 0)
|
||||||
|
ForceValuesUpdateAtIndex(UNIT_FIELD_AURASTATE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
aura->HandleAuraSpecificMods(aurApp, caster, false, false);
|
aura->HandleAuraSpecificMods(aurApp, caster, false, false);
|
||||||
|
|
||||||
@@ -20731,16 +20734,6 @@ int32 Unit::CalculateAOEDamageReduction(int32 damage, uint32 schoolMask, Unit* c
|
|||||||
return damage;
|
return damage;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ConflagrateAuraStateDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
|
|
||||||
{
|
|
||||||
if (m_owner->IsInWorld())
|
|
||||||
if (m_owner->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_WARLOCK, 0x4, 0, 0, m_casterGUID) || // immolate
|
|
||||||
m_owner->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_WARLOCK, 0, 0, 0x2, m_casterGUID)) // shadowflame
|
|
||||||
m_owner->ModifyAuraState(AURA_STATE_CONFLAGRATE, true);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Unit::ExecuteDelayedUnitRelocationEvent()
|
void Unit::ExecuteDelayedUnitRelocationEvent()
|
||||||
{
|
{
|
||||||
this->RemoveFromNotify(NOTIFY_VISIBILITY_CHANGED);
|
this->RemoveFromNotify(NOTIFY_VISIBILITY_CHANGED);
|
||||||
|
|||||||
@@ -2668,17 +2668,6 @@ namespace Acore
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
class ConflagrateAuraStateDelayEvent : public BasicEvent
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
ConflagrateAuraStateDelayEvent(Unit* owner, ObjectGuid casterGUID) : BasicEvent(), m_owner(owner), m_casterGUID(casterGUID) { }
|
|
||||||
bool Execute(uint64 e_time, uint32 p_time) override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
Unit* m_owner;
|
|
||||||
ObjectGuid m_casterGUID;
|
|
||||||
};
|
|
||||||
|
|
||||||
class RedirectSpellEvent : public BasicEvent
|
class RedirectSpellEvent : public BasicEvent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -385,10 +385,6 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
|
|||||||
damage += damage / 4;
|
damage += damage / 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Immolate - hidden delay for conflagrate
|
|
||||||
else if (m_spellInfo->SpellFamilyFlags[0] & 0x4)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
// 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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user