mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
*Break stealth when applying all stun/root/confuse/fear/charm/possess auras.
--HG-- branch : trunk
This commit is contained in:
@@ -1199,8 +1199,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
||||
}
|
||||
|
||||
unit->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_HITBYSPELL);
|
||||
//TODO: find a better way to judge CC auras
|
||||
if(m_spellInfo->Attributes & SPELL_ATTR_BREAKABLE_BY_DAMAGE)
|
||||
if(spellmgr.GetSpellCustomAttr(m_spellInfo->Id) & SPELL_ATTR_CU_AURA_CC)
|
||||
unit->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CC);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1824,15 +1824,16 @@ void SpellMgr::LoadSpellPetAuras()
|
||||
// set data in core for now
|
||||
void SpellMgr::LoadSpellCustomAttr()
|
||||
{
|
||||
mSpellCustomAttr.resize(GetSpellStore()->GetNumRows());
|
||||
|
||||
SpellEntry *tempSpell;
|
||||
for(uint32 i = 0; i < GetSpellStore()->GetNumRows(); ++i)
|
||||
{
|
||||
mSpellCustomAttr[i] = 0;
|
||||
tempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(i);
|
||||
if(!tempSpell)
|
||||
continue;
|
||||
|
||||
mSpellCustomAttrMap[tempSpell->Id] = 0;
|
||||
|
||||
for(uint32 i = 0; i < 3; ++i)
|
||||
{
|
||||
switch(tempSpell->EffectApplyAuraName[i])
|
||||
@@ -1840,11 +1841,19 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
case SPELL_AURA_PERIODIC_DAMAGE:
|
||||
case SPELL_AURA_PERIODIC_DAMAGE_PERCENT:
|
||||
case SPELL_AURA_PERIODIC_LEECH:
|
||||
mSpellCustomAttrMap[tempSpell->Id] |= SPELL_ATTR_CU_EFFECT_DAMAGE;
|
||||
mSpellCustomAttr[i] |= SPELL_ATTR_CU_AURA_DOT;
|
||||
break;
|
||||
case SPELL_AURA_PERIODIC_HEAL:
|
||||
case SPELL_AURA_OBS_MOD_HEALTH:
|
||||
mSpellCustomAttrMap[tempSpell->Id] |= SPELL_ATTR_CU_EFFECT_HEAL;
|
||||
mSpellCustomAttr[i] |= SPELL_ATTR_CU_AURA_HOT;
|
||||
break;
|
||||
case SPELL_AURA_MOD_POSSESS:
|
||||
case SPELL_AURA_MOD_CONFUSE:
|
||||
case SPELL_AURA_MOD_CHARM:
|
||||
case SPELL_AURA_MOD_FEAR:
|
||||
case SPELL_AURA_MOD_STUN:
|
||||
case SPELL_AURA_MOD_ROOT:
|
||||
mSpellCustomAttr[i] |= SPELL_ATTR_CU_AURA_CC;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -1852,14 +1861,14 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
}
|
||||
|
||||
if(tempSpell->SpellVisual == 3879)
|
||||
mSpellCustomAttrMap[tempSpell->Id] |= SPELL_ATTR_CU_CONE_BACK;
|
||||
mSpellCustomAttr[i] |= SPELL_ATTR_CU_CONE_BACK;
|
||||
|
||||
switch(tempSpell->Id)
|
||||
switch(i)
|
||||
{
|
||||
case 26029: // dark glare
|
||||
case 37433: // spout
|
||||
case 43140: case 43215: // flame breath
|
||||
mSpellCustomAttrMap[tempSpell->Id] |= SPELL_ATTR_CU_CONE_LINE;
|
||||
mSpellCustomAttr[i] |= SPELL_ATTR_CU_CONE_LINE;
|
||||
break;
|
||||
case 24340: case 26558: case 28884: // Meteor
|
||||
case 36837: case 38903: case 41276: // Meteor
|
||||
@@ -1869,7 +1878,7 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
case 40810: case 43267: case 43268: // Saber Lash
|
||||
case 42384: // Brutal Swipe
|
||||
case 45150: // Meteor Slash
|
||||
mSpellCustomAttrMap[tempSpell->Id] |= SPELL_ATTR_CU_SHARE_DAMAGE;
|
||||
mSpellCustomAttr[i] |= SPELL_ATTR_CU_SHARE_DAMAGE;
|
||||
break;
|
||||
case 44978: case 45001: case 45002: // Wild Magic
|
||||
case 45004: case 45006: case 45010: // Wild Magic
|
||||
@@ -1878,12 +1887,12 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
case 44869: // Spectral Blast
|
||||
case 45027: // Revitalize
|
||||
case 45976: // Muru Portal Channel
|
||||
mSpellCustomAttrMap[tempSpell->Id] |= SPELL_ATTR_CU_PLAYERS_ONLY;
|
||||
mSpellCustomAttr[i] |= SPELL_ATTR_CU_PLAYERS_ONLY;
|
||||
tempSpell->MaxAffectedTargets = 1;
|
||||
break;
|
||||
case 41376: // Spite
|
||||
case 39992: // Needle Spine
|
||||
mSpellCustomAttrMap[tempSpell->Id] |= SPELL_ATTR_CU_PLAYERS_ONLY;
|
||||
mSpellCustomAttr[i] |= SPELL_ATTR_CU_PLAYERS_ONLY;
|
||||
tempSpell->MaxAffectedTargets = 3;
|
||||
break;
|
||||
case 8122: case 8124: case 10888: case 10890: // Psychic Scream
|
||||
|
||||
@@ -681,10 +681,11 @@ inline bool IsProfessionSkill(uint32 skill)
|
||||
#define SPELL_ATTR_CU_CONE_BACK 0x00000002
|
||||
#define SPELL_ATTR_CU_CONE_LINE 0x00000004
|
||||
#define SPELL_ATTR_CU_SHARE_DAMAGE 0x00000008
|
||||
#define SPELL_ATTR_CU_EFFECT_HEAL 0x00000010
|
||||
#define SPELL_ATTR_CU_EFFECT_DAMAGE 0x00000020
|
||||
#define SPELL_ATTR_CU_AURA_HOT 0x00000010
|
||||
#define SPELL_ATTR_CU_AURA_DOT 0x00000020
|
||||
#define SPELL_ATTR_CU_AURA_CC 0x00000040
|
||||
|
||||
typedef std::map<uint32, uint32> SpellCustomAttrMap;
|
||||
typedef std::vector<uint32> SpellCustomAttribute;
|
||||
|
||||
typedef std::map<int32, std::vector<int32> > SpellLinkedMap;
|
||||
|
||||
@@ -888,11 +889,15 @@ class SpellMgr
|
||||
|
||||
uint32 GetSpellCustomAttr(uint32 spell_id) const
|
||||
{
|
||||
SpellCustomAttrMap::const_iterator itr = mSpellCustomAttrMap.find(spell_id);
|
||||
if(spell_id >= mSpellCustomAttr.size())
|
||||
return 0;
|
||||
else
|
||||
return mSpellCustomAttr[spell_id];
|
||||
/*SpellCustomAttrMap::const_iterator itr = mSpellCustomAttrMap.find(spell_id);
|
||||
if(itr != mSpellCustomAttrMap.end())
|
||||
return itr->second;
|
||||
else
|
||||
return 0;
|
||||
return 0;*/
|
||||
}
|
||||
|
||||
const std::vector<int32> *GetSpellLinked(int32 spell_id) const
|
||||
@@ -932,7 +937,7 @@ class SpellMgr
|
||||
SpellProcEventMap mSpellProcEventMap;
|
||||
SkillLineAbilityMap mSkillLineAbilityMap;
|
||||
SpellPetAuraMap mSpellPetAuraMap;
|
||||
SpellCustomAttrMap mSpellCustomAttrMap;
|
||||
SpellCustomAttribute mSpellCustomAttr;
|
||||
SpellLinkedMap mSpellLinkedMap;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user