mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
fix(Core/Spells): Revert triggered spell logic change. (#19983)
Revert "fix(Core/Spells): Resolve a case of triggered spells prolonging comba…"
This reverts commit edd7e10dfc.
This commit is contained in:
@@ -20228,13 +20228,13 @@ void Unit::OutDebugInfo() const
|
|||||||
class AuraMunchingQueue : public BasicEvent
|
class AuraMunchingQueue : public BasicEvent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AuraMunchingQueue(Unit& owner, ObjectGuid targetGUID, int32 basePoints, uint32 spellId, AuraEffect* aurEff) : _owner(owner), _targetGUID(targetGUID), _basePoints(basePoints), _spellId(spellId), _aurEff(aurEff) { }
|
AuraMunchingQueue(Unit& owner, ObjectGuid targetGUID, int32 basePoints, uint32 spellId) : _owner(owner), _targetGUID(targetGUID), _basePoints(basePoints), _spellId(spellId) { }
|
||||||
|
|
||||||
bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/) override
|
bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/) override
|
||||||
{
|
{
|
||||||
if (_owner.IsInWorld() && _owner.FindMap())
|
if (_owner.IsInWorld() && _owner.FindMap())
|
||||||
if (Unit* target = ObjectAccessor::GetUnit(_owner, _targetGUID))
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -20244,15 +20244,13 @@ private:
|
|||||||
ObjectGuid _targetGUID;
|
ObjectGuid _targetGUID;
|
||||||
int32 _basePoints;
|
int32 _basePoints;
|
||||||
uint32 _spellId;
|
uint32 _spellId;
|
||||||
AuraEffect* _aurEff;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void Unit::CastDelayedSpellWithPeriodicAmount(Unit* caster, uint32 spellId, AuraType auraType, int32 addAmount, uint8 effectIndex)
|
void Unit::CastDelayedSpellWithPeriodicAmount(Unit* caster, uint32 spellId, AuraType auraType, int32 addAmount, uint8 effectIndex)
|
||||||
{
|
{
|
||||||
AuraEffect* aurEff = nullptr;
|
|
||||||
for (AuraEffectList::iterator i = m_modAuras[auraType].begin(); i != m_modAuras[auraType].end(); ++i)
|
for (AuraEffectList::iterator i = m_modAuras[auraType].begin(); i != m_modAuras[auraType].end(); ++i)
|
||||||
{
|
{
|
||||||
aurEff = *i;
|
AuraEffect* aurEff = *i;
|
||||||
if (aurEff->GetCasterGUID() != caster->GetGUID() || aurEff->GetId() != spellId || aurEff->GetEffIndex() != effectIndex || !aurEff->GetTotalTicks())
|
if (aurEff->GetCasterGUID() != caster->GetGUID() || aurEff->GetId() != spellId || aurEff->GetEffIndex() != effectIndex || !aurEff->GetTotalTicks())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -20262,9 +20260,9 @@ void Unit::CastDelayedSpellWithPeriodicAmount(Unit* caster, uint32 spellId, Aura
|
|||||||
|
|
||||||
// xinef: delay only for casting on different unit
|
// xinef: delay only for casting on different unit
|
||||||
if (this == caster || !sWorld->getBoolConfig(CONFIG_MUNCHING_BLIZZLIKE))
|
if (this == caster || !sWorld->getBoolConfig(CONFIG_MUNCHING_BLIZZLIKE))
|
||||||
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
|
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()
|
void Unit::SendClearTarget()
|
||||||
|
|||||||
@@ -2931,8 +2931,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
|
|||||||
{
|
{
|
||||||
if (missInfo != SPELL_MISS_EVADE && !m_caster->IsFriendlyTo(effectUnit) && (!m_spellInfo->IsPositive() || m_spellInfo->HasEffect(SPELL_EFFECT_DISPEL)))
|
if (missInfo != SPELL_MISS_EVADE && !m_caster->IsFriendlyTo(effectUnit) && (!m_spellInfo->IsPositive() || m_spellInfo->HasEffect(SPELL_EFFECT_DISPEL)))
|
||||||
{
|
{
|
||||||
if (!m_triggeredByAuraSpell.spellInfo || (!(m_triggeredByAuraSpell.spellInfo->Effects[m_triggeredByAuraSpell.effectIndex].TriggerSpell == m_spellInfo->Id) && !(m_triggeredByAuraSpell.spellInfo->IsAuraEffectEqual(m_spellInfo))))
|
m_caster->CombatStart(effectUnit, !(m_spellInfo->AttributesEx3 & SPELL_ATTR3_SUPRESS_TARGET_PROCS));
|
||||||
m_caster->CombatStart(effectUnit, !(m_spellInfo->AttributesEx3 & SPELL_ATTR3_SUPRESS_TARGET_PROCS));
|
|
||||||
|
|
||||||
// Patch 3.0.8: All player spells which cause a creature to become aggressive to you will now also immediately cause the creature to be tapped.
|
// Patch 3.0.8: All player spells which cause a creature to become aggressive to you will now also immediately cause the creature to be tapped.
|
||||||
if (effectUnit->IsInCombatWith(m_caster))
|
if (effectUnit->IsInCombatWith(m_caster))
|
||||||
|
|||||||
Reference in New Issue
Block a user