Core/Spells: Implement SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER
This commit is contained in:
1 parent
aca3df92b8
commit
f35df037b6
3 files changed
+14
No files matched your search
@@ -2333,6 +2333,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)
|
||||
{
|
||||
@@ -2472,6 +2473,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
|
||||
|
||||
@@ -218,6 +218,8 @@ enum SpellEffectHandleMode
|
||||
|
||||
typedef std::list<std::pair<uint32, ObjectGuid>> DispelList;
|
||||
|
||||
static const uint32 SPELL_INTERRUPT_NONPLAYER = 32747;
|
||||
|
||||
class Spell
|
||||
{
|
||||
friend void Unit::SetCurrentCastSpell(Spell* pSpell);
|
||||
|
||||
@@ -3352,6 +3352,13 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
//! HACK: This spell break quest complete for alliance and on retail not used °_O
|
||||
spellInfo->Effects[EFFECT_0].Effect = 0;
|
||||
break;
|
||||
case 47476: // Deathknight - Strangulate
|
||||
case 15487: // Priest - Silence
|
||||
case 5211: // Druid - Bash - R1
|
||||
case 6798: // Druid - Bash - R2
|
||||
case 8983: // Druid - Bash - R3
|
||||
spellInfo->AttributesEx7 |= SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER;
|
||||
break;
|
||||
case 85123: // Siege Cannon (Tol Barad)
|
||||
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS);
|
||||
spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(TARGET_UNIT_SRC_AREA_ENTRY);
|
||||
|
||||
Reference in new issue
Block a user