mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Core/Spells: Implement SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER (#17160)
* Core/Spells: Implement SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER
Closes #14972
(cherry picked from commit fd88a67182)
This commit is contained in:
@@ -2364,6 +2364,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
|
||||
// if target is flagged for pvp also flag caster if a player
|
||||
if (unit->IsPvP() && m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
enablePvP = true; // Decide on PvP flagging now, but act on it later.
|
||||
|
||||
SpellMissInfo missInfo2 = DoSpellHitOnUnit(spellHitTarget, mask, target->scaleAura);
|
||||
|
||||
if (missInfo2 != SPELL_MISS_NONE)
|
||||
@@ -2504,6 +2505,10 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
|
||||
unit->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
}
|
||||
|
||||
// Check for SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER) && unit->GetTypeId() != TYPEID_PLAYER)
|
||||
caster->CastSpell(unit, SPELL_INTERRUPT_NONPLAYER, true);
|
||||
|
||||
if (spellHitTarget)
|
||||
{
|
||||
//AI functions
|
||||
|
||||
@@ -303,6 +303,8 @@ enum SpellEffectHandleMode
|
||||
|
||||
typedef std::list<std::pair<uint32, ObjectGuid>> DispelList;
|
||||
|
||||
static const uint32 SPELL_INTERRUPT_NONPLAYER = 32747;
|
||||
|
||||
class TC_GAME_API Spell
|
||||
{
|
||||
friend void Unit::SetCurrentCastSpell(Spell* pSpell);
|
||||
|
||||
Reference in New Issue
Block a user