[Core]Spell attribute allowing heartbeart resist mechanic
This commit is contained in:
parent
70c1bf2816
commit
c23bb261bc
@ -307,7 +307,7 @@ enum SpellAttributes
|
|||||||
SPELL_ATTR_CASTABLE_WHILE_SITTING = 0x08000000, // 27 castable while sitting
|
SPELL_ATTR_CASTABLE_WHILE_SITTING = 0x08000000, // 27 castable while sitting
|
||||||
SPELL_ATTR_CANT_USED_IN_COMBAT = 0x10000000, // 28 Can not be used in combat
|
SPELL_ATTR_CANT_USED_IN_COMBAT = 0x10000000, // 28 Can not be used in combat
|
||||||
SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY = 0x20000000, // 29 unaffected by invulnerability (hmm possible not...)
|
SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY = 0x20000000, // 29 unaffected by invulnerability (hmm possible not...)
|
||||||
SPELL_ATTR_UNK30 = 0x40000000, // 30 breakable by damage?
|
SPELL_ATTR_HEARTBEAT_RESIST_CHECK = 0x40000000, // 30 TC 335: random chance the effect will end (subjected to the hearbeat resist)
|
||||||
SPELL_ATTR_CANT_CANCEL = 0x80000000 // 31 positive aura can't be canceled
|
SPELL_ATTR_CANT_CANCEL = 0x80000000 // 31 positive aura can't be canceled
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4928,8 +4928,11 @@ SpellAuraHolder::SpellAuraHolder(SpellEntry const* spellproto, Unit* target, Wor
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_isHeartbeatSubject = (GetSpellMechanicMask(m_spellProto, (1 << MAX_EFFECT_INDEX) - 1) & HEARTBEAT_AURA_MECHANIC_MASK)
|
//m_isHeartbeatSubject = (GetSpellMechanicMask(m_spellProto, (1 << MAX_EFFECT_INDEX) - 1) & HEARTBEAT_AURA_MECHANIC_MASK) && caster != target
|
||||||
&& caster->GetTypeId() == TYPEID_PLAYER && target->GetTypeId() == TYPEID_PLAYER && !IsChanneledSpell(m_spellProto);
|
// && caster->GetTypeId() == TYPEID_PLAYER && target->GetTypeId() == TYPEID_PLAYER && !IsChanneledSpell(m_spellProto);
|
||||||
|
|
||||||
|
//TODO consider removing the m_isHeartbeatSubject variable due to simplified condition check
|
||||||
|
m_isHeartbeatSubject = bool(m_spellProto->Attributes & SPELL_ATTR_HEARTBEAT_RESIST_CHECK);
|
||||||
|
|
||||||
for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)
|
for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||||
{ m_auras[i] = NULL; }
|
{ m_auras[i] = NULL; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user