Core/Spells: Remove all hardcoded restrictions for pick pocket spell effect and rely only on presence of pickpocket loot in db
This commit is contained in:
1 parent
cf2bf7f77f
commit
0ca955897f
5 files changed
+28
-10
No files matched your search
@@ -2188,13 +2188,7 @@ void Spell::EffectPickPocket(SpellEffIndex /*effIndex*/)
|
||||
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
// victim must be creature and attackable
|
||||
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT || m_caster->IsFriendlyTo(unitTarget))
|
||||
return;
|
||||
|
||||
// victim have to be alive and humanoid or undead
|
||||
if (unitTarget->IsAlive() && (unitTarget->GetCreatureTypeMask() &CREATURE_TYPEMASK_HUMANOID_OR_UNDEAD) != 0)
|
||||
m_caster->ToPlayer()->SendLoot(unitTarget->GetGUID(), LOOT_PICKPOCKETING);
|
||||
m_caster->ToPlayer()->SendLoot(unitTarget->GetGUID(), LOOT_PICKPOCKETING);
|
||||
}
|
||||
|
||||
void Spell::EffectAddFarsight(SpellEffIndex effIndex)
|
||||
|
||||
Reference in new issue
Block a user