mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
Core/Spells: Fixed Spell::CheckCast for targeting items trade with lockpicking
This commit is contained in:
@@ -5370,7 +5370,7 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint
|
||||
if (m_targets.GetTargetMask() & TARGET_FLAG_TRADE_ITEM)
|
||||
{
|
||||
if (TradeData* pTrade = m_caster->ToPlayer()->GetTradeData())
|
||||
pTempItem = pTrade->GetTraderData()->GetItem(TradeSlots(m_targets.GetItemTargetGUID().GetRawValue().at(0))); // at this point item target guid contains the trade slot
|
||||
pTempItem = pTrade->GetTraderData()->GetItem(TRADE_SLOT_NONTRADED);
|
||||
}
|
||||
else if (m_targets.GetTargetMask() & TARGET_FLAG_ITEM)
|
||||
pTempItem = m_caster->ToPlayer()->GetItemByGuid(m_targets.GetItemTargetGUID());
|
||||
|
||||
Reference in New Issue
Block a user