mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-03 11:03:47 +00:00
fix(Core/Spells): triggering potion cooldowns (from TC) (#6016)
This commit is contained in:
@@ -4101,9 +4101,9 @@ void Spell::finish(bool ok)
|
||||
}
|
||||
}
|
||||
|
||||
// xinef: potions disabled by client, send event "not in combat" if need
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && !IsTriggered())
|
||||
m_caster->ToPlayer()->UpdatePotionCooldown();
|
||||
// potions disabled by client, send event "not in combat" if need
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && !m_triggeredByAuraSpell)
|
||||
m_caster->ToPlayer()->UpdatePotionCooldown(this);
|
||||
|
||||
// Take mods after trigger spell (needed for 14177 to affect 48664)
|
||||
// mods are taken only on succesfull cast and independantly from targets of the spell
|
||||
@@ -7380,6 +7380,11 @@ bool Spell::IsNextMeleeSwingSpell() const
|
||||
return m_spellInfo->HasAttribute(SPELL_ATTR0_ON_NEXT_SWING_NO_DAMAGE);
|
||||
}
|
||||
|
||||
bool Spell::IsIgnoringCooldowns() const
|
||||
{
|
||||
return (_triggeredCastFlags & TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD) != 0;
|
||||
}
|
||||
|
||||
bool Spell::IsAutoActionResetSpell() const
|
||||
{
|
||||
/// @todo changed SPELL_INTERRUPT_FLAG_AUTOATTACK -> SPELL_INTERRUPT_FLAG_INTERRUPT to fix compile - is this check correct at all?
|
||||
|
||||
@@ -509,6 +509,7 @@ public:
|
||||
bool IsTriggered() const { return _triggeredCastFlags & TRIGGERED_FULL_MASK; };
|
||||
bool IsChannelActive() const { return m_caster->GetUInt32Value(UNIT_CHANNEL_SPELL) != 0; }
|
||||
bool IsAutoActionResetSpell() const;
|
||||
bool IsIgnoringCooldowns() const;
|
||||
|
||||
bool IsDeletable() const { return !m_referencedFromCurrentSpell && !m_executedCurrently; }
|
||||
void SetReferencedFromCurrent(bool yes) { m_referencedFromCurrentSpell = yes; }
|
||||
|
||||
Reference in New Issue
Block a user