fix(Core/Spells): Remove all hardcoded restrictions for pick pocket sp… (#14788)

Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
Skjalf
2023-01-29 12:12:21 -03:00
committed by GitHub
parent b3d4d36398
commit 2aeeee9c83
7 changed files with 34 additions and 14 deletions

View File

@@ -2719,13 +2719,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)