*Correct some aura interrupt flags
--HG-- branch : trunk
This commit is contained in:
+13
-2
@@ -1184,8 +1184,9 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
||||
}
|
||||
|
||||
unit->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_HITBYSPELL);
|
||||
if(m_customAttr & SPELL_ATTR_CU_AURA_CC)
|
||||
unit->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CC);
|
||||
//TODO: This is a hack. But we do not know what types of stealth should be interrupted by CC
|
||||
if((m_customAttr & SPELL_ATTR_CU_AURA_CC) && unit->IsControlledByPlayer())
|
||||
unit->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2466,7 +2467,17 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect* triggeredByAura
|
||||
// stealth must be removed at cast starting (at show channel bar)
|
||||
// skip triggered spell (item equip spell casting and other not explicit character casts/item uses)
|
||||
if(isSpellBreakStealth(m_spellInfo) )
|
||||
{
|
||||
m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CAST);
|
||||
for(uint32 i = 0; i < 3; ++i)
|
||||
{
|
||||
if(spellmgr.EffectTargetType[m_spellInfo->Effect[i]] == SPELL_REQUIRE_UNIT)
|
||||
{
|
||||
m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_SPELL_ATTACK);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_caster->SetCurrentCastedSpell( this );
|
||||
m_selfContainer = &(m_caster->m_currentSpells[GetCurrentContainer()]);
|
||||
|
||||
@@ -289,7 +289,7 @@ HostilReference* ThreatContainer::selectNextVictim(Creature* pAttacker, HostilRe
|
||||
assert(target); // if the ref has status online the target must be there !
|
||||
|
||||
// some units are prefered in comparison to others
|
||||
if(!noPriorityTargetFound && (target->IsImmunedToDamage(pAttacker->GetMeleeDamageSchoolMask()) || target->hasNegativeAuraWithInterruptFlag(AURA_INTERRUPT_FLAG_DAMAGE)) )
|
||||
if(!noPriorityTargetFound && (target->IsImmunedToDamage(pAttacker->GetMeleeDamageSchoolMask()) || target->hasNegativeAuraWithInterruptFlag(AURA_INTERRUPT_FLAG_TAKE_DAMAGE)) )
|
||||
{
|
||||
if(iter != lastRef)
|
||||
{
|
||||
|
||||
+2
-2
@@ -579,7 +579,7 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
|
||||
if (damagetype != NODAMAGE)
|
||||
{
|
||||
// interrupting auras with AURA_INTERRUPT_FLAG_DAMAGE before checking !damage (absorbed damage breaks that type of auras)
|
||||
pVictim->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_DAMAGE, spellProto ? spellProto->Id : 0);
|
||||
pVictim->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TAKE_DAMAGE, spellProto ? spellProto->Id : 0);
|
||||
pVictim->RemoveSpellbyDamageTaken(damage, spellProto ? spellProto->Id : 0);
|
||||
}
|
||||
|
||||
@@ -2359,7 +2359,7 @@ void Unit::AttackerStateUpdate (Unit *pVictim, WeaponAttackType attType, bool ex
|
||||
return;
|
||||
|
||||
CombatStart(pVictim);
|
||||
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ATTACK);
|
||||
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_MELEE_ATTACK);
|
||||
|
||||
uint32 hitInfo;
|
||||
if (attType == BASE_ATTACK)
|
||||
|
||||
+5
-5
@@ -60,8 +60,8 @@ enum SpellChannelInterruptFlags
|
||||
enum SpellAuraInterruptFlags
|
||||
{
|
||||
AURA_INTERRUPT_FLAG_HITBYSPELL = 0x00000001, // 0 removed when getting hit by a negative spell?
|
||||
AURA_INTERRUPT_FLAG_DAMAGE = 0x00000002, // 1 removed by any damage
|
||||
AURA_INTERRUPT_FLAG_CC = 0x00000004, // 2 crowd control
|
||||
AURA_INTERRUPT_FLAG_TAKE_DAMAGE = 0x00000002, // 1 removed by any damage
|
||||
AURA_INTERRUPT_FLAG_CAST = 0x00000004, // 2 cast any spells
|
||||
AURA_INTERRUPT_FLAG_MOVE = 0x00000008, // 3 removed by any movement
|
||||
AURA_INTERRUPT_FLAG_TURNING = 0x00000010, // 4 removed by any turning
|
||||
AURA_INTERRUPT_FLAG_JUMP = 0x00000020, // 5 removed by entering combat
|
||||
@@ -71,8 +71,8 @@ enum SpellAuraInterruptFlags
|
||||
AURA_INTERRUPT_FLAG_NOT_SHEATHED = 0x00000200, // 9 removed by unsheathing
|
||||
AURA_INTERRUPT_FLAG_TALK = 0x00000400, // 10 talk to npc / loot? action on creature
|
||||
AURA_INTERRUPT_FLAG_USE = 0x00000800, // 11 mine/use/open action on gameobject
|
||||
AURA_INTERRUPT_FLAG_ATTACK = 0x00001000, // 12 removed by attacking
|
||||
AURA_INTERRUPT_FLAG_CAST = 0x00002000, // 13 ???
|
||||
AURA_INTERRUPT_FLAG_MELEE_ATTACK = 0x00001000, // 12 removed by attacking
|
||||
AURA_INTERRUPT_FLAG_SPELL_ATTACK = 0x00002000, // 13 ???
|
||||
AURA_INTERRUPT_FLAG_UNK14 = 0x00004000, // 14
|
||||
AURA_INTERRUPT_FLAG_TRANSFORM = 0x00008000, // 15 removed by transform?
|
||||
AURA_INTERRUPT_FLAG_UNK16 = 0x00010000, // 16
|
||||
@@ -85,7 +85,7 @@ enum SpellAuraInterruptFlags
|
||||
AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT = 0x00800000, // 23 removed by entering pvp combat
|
||||
AURA_INTERRUPT_FLAG_DIRECT_DAMAGE = 0x01000000, // 24 removed by any direct damage
|
||||
|
||||
AURA_INTERRUPT_FLAG_NOT_VICTIM = (AURA_INTERRUPT_FLAG_HITBYSPELL | AURA_INTERRUPT_FLAG_DAMAGE | AURA_INTERRUPT_FLAG_DIRECT_DAMAGE),
|
||||
AURA_INTERRUPT_FLAG_NOT_VICTIM = (AURA_INTERRUPT_FLAG_HITBYSPELL | AURA_INTERRUPT_FLAG_TAKE_DAMAGE | AURA_INTERRUPT_FLAG_DIRECT_DAMAGE),
|
||||
};
|
||||
|
||||
enum SpellModOp
|
||||
|
||||
Reference in New Issue
Block a user