diff --git a/src/game/ItemPrototype.h b/src/game/ItemPrototype.h index a62380833..28a57ec79 100644 --- a/src/game/ItemPrototype.h +++ b/src/game/ItemPrototype.h @@ -74,6 +74,12 @@ enum ItemSpelltriggerType ITEM_SPELLTRIGGER_ON_EQUIP = 1, ITEM_SPELLTRIGGER_CHANCE_ON_HIT = 2, 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_LEARN_SPELL_ID = 6 // used in item_template.spell_2 with spell_id with SPELL_GENERIC_LEARN in spell_1 }; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 3dfffc4ef..09fe1faab 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -799,7 +799,12 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa if(Spell* spell = pVictim->m_currentSpells[i]) if(spell->getState() == SPELL_STATE_PREPARING) - spell->Delayed(); + { + if(spell->m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_ABORT_ON_DMG) + pVictim->InterruptSpell(i); + else + spell->Delayed(); + } } } diff --git a/src/game/Unit.h b/src/game/Unit.h index cf0d7c3ca..36eb900b3 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -40,7 +40,8 @@ enum SpellInterruptFlags SPELL_INTERRUPT_FLAG_DAMAGE = 0x02, SPELL_INTERRUPT_FLAG_INTERRUPT = 0x04, 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 diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index e80f58286..73f701324 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7093" + #define REVISION_NR "7094" #endif // __REVISION_NR_H__