mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7094] Implemented spell interrupt flag 0x10
This commit is contained in:
parent
a1e0900d37
commit
2cfebd6a57
4 changed files with 15 additions and 3 deletions
|
|
@ -74,6 +74,12 @@ enum ItemSpelltriggerType
|
||||||
ITEM_SPELLTRIGGER_ON_EQUIP = 1,
|
ITEM_SPELLTRIGGER_ON_EQUIP = 1,
|
||||||
ITEM_SPELLTRIGGER_CHANCE_ON_HIT = 2,
|
ITEM_SPELLTRIGGER_CHANCE_ON_HIT = 2,
|
||||||
ITEM_SPELLTRIGGER_SOULSTONE = 4,
|
ITEM_SPELLTRIGGER_SOULSTONE = 4,
|
||||||
|
/*
|
||||||
|
* ItemSpelltriggerType 5 might have changed on 2.4.3/3.0.3: Such auras
|
||||||
|
* will be applied on item pickup and removed on item loss - maybe on the
|
||||||
|
* other hand the item is destroyed if the aura is removed ("removed on
|
||||||
|
* death" of spell 57348 makes me think so)
|
||||||
|
*/
|
||||||
ITEM_SPELLTRIGGER_ON_NO_DELAY_USE = 5, // no equip cooldown
|
ITEM_SPELLTRIGGER_ON_NO_DELAY_USE = 5, // no equip cooldown
|
||||||
ITEM_SPELLTRIGGER_LEARN_SPELL_ID = 6 // used in item_template.spell_2 with spell_id with SPELL_GENERIC_LEARN in spell_1
|
ITEM_SPELLTRIGGER_LEARN_SPELL_ID = 6 // used in item_template.spell_2 with spell_id with SPELL_GENERIC_LEARN in spell_1
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -799,9 +799,14 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
|
||||||
|
|
||||||
if(Spell* spell = pVictim->m_currentSpells[i])
|
if(Spell* spell = pVictim->m_currentSpells[i])
|
||||||
if(spell->getState() == SPELL_STATE_PREPARING)
|
if(spell->getState() == SPELL_STATE_PREPARING)
|
||||||
|
{
|
||||||
|
if(spell->m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_ABORT_ON_DMG)
|
||||||
|
pVictim->InterruptSpell(i);
|
||||||
|
else
|
||||||
spell->Delayed();
|
spell->Delayed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(Spell* spell = pVictim->m_currentSpells[CURRENT_CHANNELED_SPELL])
|
if(Spell* spell = pVictim->m_currentSpells[CURRENT_CHANNELED_SPELL])
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,8 @@ enum SpellInterruptFlags
|
||||||
SPELL_INTERRUPT_FLAG_DAMAGE = 0x02,
|
SPELL_INTERRUPT_FLAG_DAMAGE = 0x02,
|
||||||
SPELL_INTERRUPT_FLAG_INTERRUPT = 0x04,
|
SPELL_INTERRUPT_FLAG_INTERRUPT = 0x04,
|
||||||
SPELL_INTERRUPT_FLAG_AUTOATTACK = 0x08,
|
SPELL_INTERRUPT_FLAG_AUTOATTACK = 0x08,
|
||||||
//SPELL_INTERRUPT_FLAG_TURNING = 0x10 // not turning - maybe _complete_ interrupt on direct damage?
|
SPELL_INTERRUPT_FLAG_ABORT_ON_DMG = 0x10, // _complete_ interrupt on direct damage
|
||||||
|
//SPELL_INTERRUPT_UNK = 0x20 // unk, 564 of 727 spells having this spell start with "Glyph"
|
||||||
};
|
};
|
||||||
|
|
||||||
enum SpellChannelInterruptFlags
|
enum SpellChannelInterruptFlags
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7093"
|
#define REVISION_NR "7094"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue