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

@@ -3880,22 +3880,7 @@ void Spell::EffectPickPocket(uint32 /*i*/)
// victim have to be alive and humanoid or undead
if (unitTarget->isAlive() && (unitTarget->GetCreatureTypeMask() &CREATURE_TYPEMASK_HUMANOID_OR_UNDEAD) != 0)
{
int32 chance = 10 + int32(m_caster->getLevel()) - int32(unitTarget->getLevel());
if (chance > irand(0, 19))
{
// Stealing successful
//sLog.outDebug("Sending loot from pickpocket");
((Player*)m_caster)->SendLoot(unitTarget->GetGUID(),LOOT_PICKPOCKETING);
}
else
{
// Reveal action + get attack
m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TALK);
m_caster->CombatStart(unitTarget);
}
}
((Player*)m_caster)->SendLoot(unitTarget->GetGUID(),LOOT_PICKPOCKETING);
}
void Spell::EffectAddFarsight(uint32 i)