Skip to content

Commit

Permalink
Allow lockpicking items in the trade window
Browse files Browse the repository at this point in the history
  • Loading branch information
davidonete authored and killerwife committed Jul 3, 2024
1 parent 19ba20c commit 9285779
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/game/Spells/Spell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5455,7 +5455,10 @@ SpellCastResult Spell::CheckCast(bool strict)
else if (Item* item = m_targets.getItemTarget())
{
// not own (trade?)
if (item->GetOwner() != m_caster)
Player* itemOwner = item->GetOwner();
Player* itemTrader = itemOwner->GetTrader();

if (itemOwner != m_caster && itemTrader != m_caster)
return SPELL_FAILED_ITEM_GONE;

lockId = item->GetProto()->LockID;
Expand Down

0 comments on commit 9285779

Please sign in to comment.