aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
authorthenecromancer <none@none>2010-01-13 11:47:50 +0100
committerthenecromancer <none@none>2010-01-13 11:47:50 +0100
commitefbc71746f7f038c453279b1929d4ef76bcbfe2e (patch)
tree6802e6850f6171400506b69fa8f410321b7010d3 /src/game/Spell.cpp
parent4b0d412e42b074ee16e24d31b4956b2877eea555 (diff)
Fix pickpocket - reveal rogue only if spell is resisted
--HG-- branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 14d6f7ba812..f1c31d6434c 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1208,6 +1208,16 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
// Do triggers for unit (reflect triggers passed on hit phase for correct drop charge)
if (canEffectTrigger && missInfo != SPELL_MISS_REFLECT)
caster->ProcDamageAndSpell(unit, procAttacker, procVictim, procEx, 0, m_attackType, m_spellInfo, m_triggeredByAuraSpell);
+
+ // Failed Pickpocket, reveal rogue
+ if (missInfo == SPELL_MISS_RESIST
+ && m_customAttr & SPELL_ATTR_CU_PICKPOCKET
+ && unitTarget->GetTypeId() == TYPEID_UNIT)
+ {
+ m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TALK);
+ if (((Creature*)unitTarget)->IsAIEnabled)
+ ((Creature*)unitTarget)->AI()->AttackStart(m_caster);
+ }
}
if(m_caster && !m_caster->IsFriendlyTo(unit) && !IsPositiveSpell(m_spellInfo->Id))