Core/Spells: Define and implement attribute SPELL_ATTR3_CANT_TRIGGER_PROC, change names of some attributes to better describe their functionality.

This commit is contained in:
QAston
2011-07-13 17:18:04 +02:00
parent 1c7616dcc8
commit 20e8c25b48
4 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -14308,7 +14308,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* pTarget, uint32 procFlag,
continue; continue;
// Triggered spells not triggering additional spells // Triggered spells not triggering additional spells
bool triggered= !(spellProto->AttributesEx3 & SPELL_ATTR3_CAN_PROC_TRIGGERED) ? bool triggered= !(spellProto->AttributesEx3 & SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED) ?
(procExtra & PROC_EX_INTERNAL_TRIGGERED && !(procFlag & PROC_FLAG_DONE_TRAP_ACTIVATION)) : false; (procExtra & PROC_EX_INTERNAL_TRIGGERED && !(procFlag & PROC_FLAG_DONE_TRAP_ACTIVATION)) : false;
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
@@ -15198,7 +15198,7 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura * aura, SpellEntry co
// Additional checks for triggered spells (ignore trap casts) // Additional checks for triggered spells (ignore trap casts)
if (procExtra & PROC_EX_INTERNAL_TRIGGERED && !(procFlag & PROC_FLAG_DONE_TRAP_ACTIVATION)) if (procExtra & PROC_EX_INTERNAL_TRIGGERED && !(procFlag & PROC_FLAG_DONE_TRAP_ACTIVATION))
{ {
if (!(spellProto->AttributesEx3 & SPELL_ATTR3_CAN_PROC_TRIGGERED)) if (!(spellProto->AttributesEx3 & SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED))
return false; return false;
} }
@@ -308,7 +308,7 @@ enum SpellAttr1
SPELL_ATTR1_CHANNELED_2 = 0x00000040, // 6 SPELL_ATTR1_CHANNELED_2 = 0x00000040, // 6
SPELL_ATTR1_NEGATIVE = 0x00000080, // 7 SPELL_ATTR1_NEGATIVE = 0x00000080, // 7
SPELL_ATTR1_NOT_IN_COMBAT_TARGET = 0x00000100, // 8 Spell req target not to be in combat state SPELL_ATTR1_NOT_IN_COMBAT_TARGET = 0x00000100, // 8 Spell req target not to be in combat state
SPELL_ATTR1_MELEE_COMBAT_SPELL = 0x00000200, // 9 spells with this flag can be cast only if caster is able to melee attack target SPELL_ATTR1_MELEE_COMBAT_SPELL = 0x00000200, // 9 player starts melee combat after this spell is cast
SPELL_ATTR1_NO_THREAT = 0x00000400, // 10 no generates threat on cast 100% (old NO_INITIAL_AGGRO) SPELL_ATTR1_NO_THREAT = 0x00000400, // 10 no generates threat on cast 100% (old NO_INITIAL_AGGRO)
SPELL_ATTR1_UNK11 = 0x00000800, // 11 aura SPELL_ATTR1_UNK11 = 0x00000800, // 11 aura
SPELL_ATTR1_UNK12 = 0x00001000, // 12 SPELL_ATTR1_UNK12 = 0x00001000, // 12
@@ -365,7 +365,7 @@ enum SpellAttr2
SPELL_ATTR2_UNK27 = 0x08000000, // 27 SPELL_ATTR2_UNK27 = 0x08000000, // 27
SPELL_ATTR2_UNK28 = 0x10000000, // 28 no breaks stealth if it fails?? SPELL_ATTR2_UNK28 = 0x10000000, // 28 no breaks stealth if it fails??
SPELL_ATTR2_CANT_CRIT = 0x20000000, // 29 Spell can't crit SPELL_ATTR2_CANT_CRIT = 0x20000000, // 29 Spell can't crit
SPELL_ATTR2_TRIGGERED_CAN_TRIGGER = 0x40000000, // 30 spell can trigger even if triggered SPELL_ATTR2_TRIGGERED_CAN_TRIGGER_PROC = 0x40000000, // 30 spell can trigger even if triggered
SPELL_ATTR2_FOOD_BUFF = 0x80000000 // 31 Food or Drink Buff (like Well Fed) SPELL_ATTR2_FOOD_BUFF = 0x80000000 // 31 Food or Drink Buff (like Well Fed)
}; };
@@ -380,14 +380,14 @@ enum SpellAttr3
SPELL_ATTR3_UNK6 = 0x00000040, // 6 SPELL_ATTR3_UNK6 = 0x00000040, // 6
SPELL_ATTR3_STACK_FOR_DIFF_CASTERS = 0x00000080, // 7 separate stack for every caster SPELL_ATTR3_STACK_FOR_DIFF_CASTERS = 0x00000080, // 7 separate stack for every caster
SPELL_ATTR3_PLAYERS_ONLY = 0x00000100, // 8 Player only? SPELL_ATTR3_PLAYERS_ONLY = 0x00000100, // 8 Player only?
SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_2 = 0x00000200, // 9 triggered from effect? SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2 = 0x00000200, // 9 triggered from effect?
SPELL_ATTR3_MAIN_HAND = 0x00000400, // 10 Main hand weapon required SPELL_ATTR3_MAIN_HAND = 0x00000400, // 10 Main hand weapon required
SPELL_ATTR3_BATTLEGROUND = 0x00000800, // 11 Can casted only on battleground SPELL_ATTR3_BATTLEGROUND = 0x00000800, // 11 Can casted only on battleground
SPELL_ATTR3_REQUIRE_DEAD_TARGET = 0x00001000, // 12 SPELL_ATTR3_REQUIRE_DEAD_TARGET = 0x00001000, // 12
SPELL_ATTR3_UNK13 = 0x00002000, // 13 SPELL_ATTR3_UNK13 = 0x00002000, // 13
SPELL_ATTR3_UNK14 = 0x00004000, // 14 "Honorless Target" only this spells have this flag SPELL_ATTR3_UNK14 = 0x00004000, // 14 "Honorless Target" only this spells have this flag
SPELL_ATTR3_UNK15 = 0x00008000, // 15 Auto Shoot, Shoot, Throw, - this is autoshot flag SPELL_ATTR3_UNK15 = 0x00008000, // 15 Auto Shoot, Shoot, Throw, - this is autoshot flag
SPELL_ATTR3_UNK16 = 0x00010000, // 16 no triggers effects that trigger on casting a spell?? (15290 - 2.2ptr change) SPELL_ATTR3_CANT_TRIGGER_PROC = 0x00010000, // 16 confirmed with many patchnotes
SPELL_ATTR3_NO_INITIAL_AGGRO = 0x00020000, // 17 Soothe Animal, 39758, Mind Soothe SPELL_ATTR3_NO_INITIAL_AGGRO = 0x00020000, // 17 Soothe Animal, 39758, Mind Soothe
SPELL_ATTR3_IGNORE_HIT_RESULT = 0x00040000, // 18 Spell should always hit its target SPELL_ATTR3_IGNORE_HIT_RESULT = 0x00040000, // 18 Spell should always hit its target
SPELL_ATTR3_DISABLE_PROC = 0x00080000, // 19 during aura proc no spells can trigger (20178, 20375) SPELL_ATTR3_DISABLE_PROC = 0x00080000, // 19 during aura proc no spells can trigger (20178, 20375)
@@ -397,7 +397,7 @@ enum SpellAttr3
SPELL_ATTR3_UNK23 = 0x00800000, // 23 SPELL_ATTR3_UNK23 = 0x00800000, // 23
SPELL_ATTR3_REQ_OFFHAND = 0x01000000, // 24 Req offhand weapon SPELL_ATTR3_REQ_OFFHAND = 0x01000000, // 24 Req offhand weapon
SPELL_ATTR3_UNK25 = 0x02000000, // 25 no cause spell pushback ? SPELL_ATTR3_UNK25 = 0x02000000, // 25 no cause spell pushback ?
SPELL_ATTR3_CAN_PROC_TRIGGERED = 0x04000000, // 26 SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED = 0x04000000, // 26 auras with this attribute can proc from triggered spell casts with SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2 (67736 + 52999)
SPELL_ATTR3_DRAIN_SOUL = 0x08000000, // 27 only drain soul has this flag SPELL_ATTR3_DRAIN_SOUL = 0x08000000, // 27 only drain soul has this flag
SPELL_ATTR3_UNK28 = 0x10000000, // 28 SPELL_ATTR3_UNK28 = 0x10000000, // 28
SPELL_ATTR3_NO_DONE_BONUS = 0x20000000, // 29 Ignore caster spellpower and done damage mods? SPELL_ATTR3_NO_DONE_BONUS = 0x20000000, // 29 Ignore caster spellpower and done damage mods?
+3 -3
View File
@@ -906,8 +906,8 @@ void Spell::prepareDataForTriggerSystem(AuraEffect const* /*triggeredByAura*/)
if (!(m_procAttacker & PROC_FLAG_DONE_RANGED_AUTO_ATTACK)) if (!(m_procAttacker & PROC_FLAG_DONE_RANGED_AUTO_ATTACK))
{ {
if (m_IsTriggeredSpell && if (m_IsTriggeredSpell &&
(m_spellInfo->AttributesEx2 & SPELL_ATTR2_TRIGGERED_CAN_TRIGGER || (m_spellInfo->AttributesEx2 & SPELL_ATTR2_TRIGGERED_CAN_TRIGGER_PROC ||
m_spellInfo->AttributesEx3 & SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_2)) m_spellInfo->AttributesEx3 & SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2))
m_procEx |= PROC_EX_INTERNAL_CANT_PROC; m_procEx |= PROC_EX_INTERNAL_CANT_PROC;
else if (m_IsTriggeredSpell) else if (m_IsTriggeredSpell)
m_procEx |= PROC_EX_INTERNAL_TRIGGERED; m_procEx |= PROC_EX_INTERNAL_TRIGGERED;
@@ -1163,7 +1163,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
//Spells with this flag cannot trigger if effect is casted on self //Spells with this flag cannot trigger if effect is casted on self
// Slice and Dice, relentless strikes, eviscerate // Slice and Dice, relentless strikes, eviscerate
bool canEffectTrigger = unitTarget->CanProc() && CanExecuteTriggersOnHit(mask); bool canEffectTrigger = m_spellInfo->AttributesEx3 & SPELL_ATTR3_CANT_TRIGGER_PROC && unitTarget->CanProc() && CanExecuteTriggersOnHit(mask);
Unit* spellHitTarget = NULL; Unit* spellHitTarget = NULL;
if (missInfo == SPELL_MISS_NONE) // In case spell hit target, do all effect on that target if (missInfo == SPELL_MISS_NONE) // In case spell hit target, do all effect on that target
+1 -1
View File
@@ -3943,7 +3943,7 @@ void SpellMgr::LoadSpellCustomAttr()
case 20337: case 20337:
case 63320: // Glyph of Life Tap case 63320: // Glyph of Life Tap
// Entries were not updated after spell effect change, we have to do that manually :/ // Entries were not updated after spell effect change, we have to do that manually :/
spellInfo->AttributesEx3 |= SPELL_ATTR3_CAN_PROC_TRIGGERED; spellInfo->AttributesEx3 |= SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED;
++count; ++count;
break; break;
case 16007: // Draco-Incarcinatrix 900 case 16007: // Draco-Incarcinatrix 900