diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index f0e5beb99..219d0ff20 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -4468,19 +4468,12 @@ void Unit::_ApplyAura(AuraApplication* aurApp, uint8 effMask) SpellInfo const* spellInfo = aura->GetSpellInfo(); if (AuraStateType aState = spellInfo->GetAuraState()) { - if (aState != AURA_STATE_CONFLAGRATE) - { - // Sting (hunter's pet ability), Faerie Fire (druid versions) - if (aState == AURA_STATE_FAERIE_FIRE) - aurApp->GetTarget()->RemoveAurasByType(SPELL_AURA_MOD_STEALTH); - + uint32 aStateMask = (1 << (aState - 1)); + // force update so the new caster registers it + if ((aStateMask & PER_CASTER_AURA_STATE_MASK) && HasFlag(UNIT_FIELD_AURASTATE, aStateMask)) + ForceValuesUpdateAtIndex(UNIT_FIELD_AURASTATE); + else 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()) @@ -4575,9 +4568,19 @@ void Unit::_UnapplyAura(AuraApplicationMap::iterator& i, AuraRemoveMode removeMo ToTotem()->setDeathState(DeathState::JustDied); } - // Remove aurastates only if were not found - if (!auraStateFound) - ModifyAuraState(auraState, false); + // Remove aurastates only if needed and were not found + if (auraState) + { + 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); @@ -20731,16 +20734,6 @@ int32 Unit::CalculateAOEDamageReduction(int32 damage, uint32 schoolMask, Unit* c 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() { this->RemoveFromNotify(NOTIFY_VISIBILITY_CHANGED); diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 8488193f0..bf70798d9 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -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 { public: diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 2edb149eb..990901cf3 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -385,10 +385,6 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex) damage += damage / 4; } } - // Immolate - hidden delay for conflagrate - else if (m_spellInfo->SpellFamilyFlags[0] & 0x4) - { - } // Conflagrate - consumes Immolate or Shadowflame else if (m_spellInfo->TargetAuraState == AURA_STATE_CONFLAGRATE) {