Fix pickpocket - reveal rogue only if spell is resisted

--HG--
branch : trunk
This commit is contained in:
thenecromancer
2010-01-13 11:47:50 +01:00
parent 4b0d412e42
commit efbc71746f
2 changed files with 11 additions and 16 deletions

View File

@@ -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))