mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
*Fix cooldown set for Reincarnation
*Change some aura interrupt flags description to handle stealth breaking correctly. --HG-- branch : trunk
This commit is contained in:
@@ -3240,7 +3240,6 @@ void Player::_LoadSpellCooldowns(QueryResult *result)
|
||||
// some cooldowns can be already set at aura loading...
|
||||
|
||||
//QueryResult *result = CharacterDatabase.PQuery("SELECT spell,item,time FROM character_spell_cooldown WHERE guid = '%u'",GetGUIDLow());
|
||||
|
||||
if(result)
|
||||
{
|
||||
time_t curTime = time(NULL);
|
||||
|
||||
@@ -1100,8 +1100,8 @@ void 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);
|
||||
//if(m_customAttr & SPELL_ATTR_CU_AURA_CC)
|
||||
//unit->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CC);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2209,6 +2209,9 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect* triggeredByAura
|
||||
if(isSpellBreakStealth(m_spellInfo) )
|
||||
m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CAST);
|
||||
|
||||
if(!m_IsTriggeredSpell)
|
||||
m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ANY_CAST);
|
||||
|
||||
m_caster->SetCurrentCastedSpell( this );
|
||||
m_selfContainer = &(m_caster->m_currentSpells[GetCurrentContainer()]);
|
||||
SendSpellStart();
|
||||
|
||||
@@ -935,7 +935,8 @@ void Aura::_AddAura()
|
||||
// set infinity cooldown state for spells
|
||||
if(caster && caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (m_spellProto->Attributes & SPELL_ATTR_DISABLED_WHILE_ACTIVE)
|
||||
// Do not apply cooldown for caster passive spells (needed by Reincarnation)
|
||||
if (!(caster->HasSpell(GetId()) && IsPassive()) && !(m_spellProto->Attributes & SPELL_ATTR_DISABLED_WHILE_ACTIVE))
|
||||
{
|
||||
Item* castItem = m_castItemGuid ? ((Player*)caster)->GetItemByGuid(m_castItemGuid) : NULL;
|
||||
((Player*)caster)->AddSpellAndCategoryCooldowns(m_spellProto,castItem ? castItem->GetEntry() : 0, NULL,true);
|
||||
|
||||
@@ -59,9 +59,9 @@ enum SpellChannelInterruptFlags
|
||||
|
||||
enum SpellAuraInterruptFlags
|
||||
{
|
||||
AURA_INTERRUPT_FLAG_HITBYSPELL = 0x00000001, // 0 removed when getting hit by a negative spell?
|
||||
AURA_INTERRUPT_FLAG_ANY_CAST = 0x00000001, // 0 removed by any cast
|
||||
AURA_INTERRUPT_FLAG_DAMAGE = 0x00000002, // 1 removed by any damage
|
||||
AURA_INTERRUPT_FLAG_CC = 0x00000004, // 2 crowd control
|
||||
AURA_INTERRUPT_FLAG_HITBYSPELL = 0x00000004, // 2 removed when getting hit by a negative spell? aoe damage?
|
||||
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_ATTACK = 0x00001000, // 12 removed by attacking (negative spell cast?)
|
||||
AURA_INTERRUPT_FLAG_CAST = 0x00002000, // 13 cast stealth breaking spell
|
||||
AURA_INTERRUPT_FLAG_UNK14 = 0x00004000, // 14
|
||||
AURA_INTERRUPT_FLAG_TRANSFORM = 0x00008000, // 15 removed by transform?
|
||||
AURA_INTERRUPT_FLAG_UNK16 = 0x00010000, // 16
|
||||
|
||||
Reference in New Issue
Block a user