Do not proc relentless strikes with slice and dice twice, fix vanish stealth apply
--HG-- branch : trunk
This commit is contained in:
+3
-2
@@ -978,7 +978,8 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
|||||||
uint32 procEx = PROC_EX_NONE;
|
uint32 procEx = PROC_EX_NONE;
|
||||||
|
|
||||||
//Spells with this flag cannot trigger if effect is casted on self
|
//Spells with this flag cannot trigger if effect is casted on self
|
||||||
bool canEffectTrigger = (m_spellInfo->AttributesEx4 & SPELL_ATTR_EX4_CANT_PROC_FROM_SELFCAST ? m_caster!=unitTarget : true)
|
// Slice and Dice, relentless strikes, eviscerate
|
||||||
|
bool canEffectTrigger = (m_spellInfo->AttributesEx4 & (SPELL_ATTR_EX4_CANT_PROC_FROM_SELFCAST | SPELL_ATTR_EX4_UNK4) ? m_caster!=unitTarget : true)
|
||||||
&& m_canTrigger;
|
&& m_canTrigger;
|
||||||
|
|
||||||
if (missInfo==SPELL_MISS_NONE) // In case spell hit target, do all effect on that target
|
if (missInfo==SPELL_MISS_NONE) // In case spell hit target, do all effect on that target
|
||||||
@@ -1222,7 +1223,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
|||||||
((Creature*)m_caster)->AI()->SpellHitTarget(unit, m_spellInfo);
|
((Creature*)m_caster)->AI()->SpellHitTarget(unit, m_spellInfo);
|
||||||
|
|
||||||
// spells with this flag can trigger only if not selfcast (eviscerate for example)
|
// spells with this flag can trigger only if not selfcast (eviscerate for example)
|
||||||
if (m_ChanceTriggerSpells.size() && (!(m_spellInfo->AttributesEx4 & SPELL_ATTR_EX4_CANT_PROC_FROM_SELFCAST) || unit!=m_caster))
|
if (m_ChanceTriggerSpells.size() && (!(m_spellInfo->AttributesEx4 & SPELL_ATTR_EX4_CANT_PROC_FROM_SELFCAST | SPELL_ATTR_EX4_UNK4) || unit!=m_caster))
|
||||||
{
|
{
|
||||||
int _duration=0;
|
int _duration=0;
|
||||||
for(ChanceTriggerSpells::const_iterator i = m_ChanceTriggerSpells.begin(); i != m_ChanceTriggerSpells.end(); ++i)
|
for(ChanceTriggerSpells::const_iterator i = m_ChanceTriggerSpells.begin(); i != m_ChanceTriggerSpells.end(); ++i)
|
||||||
|
|||||||
@@ -1824,7 +1824,8 @@ void Spell::EffectTriggerSpell(uint32 i)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// get highest rank of the Stealth spell
|
// get highest rank of the Stealth spell
|
||||||
uint32 spellId = 0;
|
bool found = false;
|
||||||
|
SpellEntry const *spellInfo;
|
||||||
const PlayerSpellMap& sp_list = ((Player*)m_caster)->GetSpellMap();
|
const PlayerSpellMap& sp_list = ((Player*)m_caster)->GetSpellMap();
|
||||||
for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr)
|
for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr)
|
||||||
{
|
{
|
||||||
@@ -1832,26 +1833,26 @@ void Spell::EffectTriggerSpell(uint32 i)
|
|||||||
if(!itr->second->active || itr->second->disabled || itr->second->state == PLAYERSPELL_REMOVED)
|
if(!itr->second->active || itr->second->disabled || itr->second->state == PLAYERSPELL_REMOVED)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
|
spellInfo = sSpellStore.LookupEntry(itr->first);
|
||||||
if (!spellInfo)
|
if (!spellInfo)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE && spellInfo->SpellFamilyFlags & SPELLFAMILYFLAG_ROGUE_STEALTH)
|
if (spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE && spellInfo->SpellFamilyFlags & SPELLFAMILYFLAG_ROGUE_STEALTH)
|
||||||
{
|
{
|
||||||
spellId = spellInfo->Id;
|
found=true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// no Stealth spell found
|
// no Stealth spell found
|
||||||
if (!spellId)
|
if (!found)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// reset cooldown on it if needed
|
// reset cooldown on it if needed
|
||||||
if(((Player*)m_caster)->HasSpellCooldown(spellId))
|
if(((Player*)m_caster)->HasSpellCooldown(spellInfo->Id))
|
||||||
((Player*)m_caster)->RemoveSpellCooldown(spellId);
|
((Player*)m_caster)->RemoveSpellCooldown(spellInfo->Id);
|
||||||
|
|
||||||
m_caster->CastSpell(m_caster, spellId, true);
|
m_TriggerSpells.push_back(spellInfo);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// just skip
|
// just skip
|
||||||
@@ -1961,8 +1962,7 @@ void Spell::EffectTriggerSpell(uint32 i)
|
|||||||
for(uint32 j = i+1; j < 3; ++j)
|
for(uint32 j = i+1; j < 3; ++j)
|
||||||
{
|
{
|
||||||
if(m_spellInfo->EffectImplicitTargetA[j] == TARGET_UNIT_CASTER
|
if(m_spellInfo->EffectImplicitTargetA[j] == TARGET_UNIT_CASTER
|
||||||
&& (m_spellInfo->Effect[j]==SPELL_EFFECT_INSTAKILL
|
&& (m_spellInfo->Effect[j]==SPELL_EFFECT_INSTAKILL))
|
||||||
|| m_spellInfo->Effect[j]==SPELL_EFFECT_SANCTUARY))
|
|
||||||
{
|
{
|
||||||
instant = true;
|
instant = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user