mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 10:55:43 +00:00
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:
@@ -19,6 +19,7 @@
|
||||
#include "Chat.h"
|
||||
#include "ConditionMgr.h"
|
||||
#include "DBCStores.h"
|
||||
#include "LootMgr.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "Spell.h"
|
||||
@@ -1777,11 +1778,13 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, WorldObject const* ta
|
||||
if (targetCreature->hasLootRecipient() && !targetCreature->isTappedBy(caster->ToPlayer()))
|
||||
return SPELL_FAILED_CANT_CAST_ON_TAPPED;
|
||||
|
||||
if (AttributesCu & SPELL_ATTR0_CU_PICKPOCKET)
|
||||
if (HasAttribute(SPELL_ATTR0_CU_PICKPOCKET))
|
||||
{
|
||||
if (unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
Creature const* targetCreature = unitTarget->ToCreature();
|
||||
if (!targetCreature)
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
else if ((unitTarget->GetCreatureTypeMask() & CREATURE_TYPEMASK_HUMANOID_OR_UNDEAD) == 0)
|
||||
|
||||
if (!LootTemplates_Pickpocketing.HaveLootFor(targetCreature->GetCreatureTemplate()->pickpocketLootId))
|
||||
return SPELL_FAILED_TARGET_NO_POCKETS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user